正在显示
2 个修改的文件
包含
2 行增加
和
3 行删除
@@ -35,10 +35,9 @@ class AdminAllStatisticsController extends AdminBaseController{ | @@ -35,10 +35,9 @@ class AdminAllStatisticsController extends AdminBaseController{ | ||
35 | ->group('a.mac_address') | 35 | ->group('a.mac_address') |
36 | ->order('start_time','desc') | 36 | ->order('start_time','desc') |
37 | ->paginate(10)->each(function ($item){ | 37 | ->paginate(10)->each(function ($item){ |
38 | - $item['average']=$item['sumTime']/$item['num']; | 38 | + $item['average']=round($item['sumTime']/$item['num']); |
39 | return $item; | 39 | return $item; |
40 | }); | 40 | }); |
41 | - dump($data->toArray()); | ||
42 | $this->assign('data',$data); | 41 | $this->assign('data',$data); |
43 | return $this->fetch(); | 42 | return $this->fetch(); |
44 | } | 43 | } |
@@ -49,7 +49,7 @@ class AdminOrderController extends AdminBaseController{ | @@ -49,7 +49,7 @@ class AdminOrderController extends AdminBaseController{ | ||
49 | ->where($where) | 49 | ->where($where) |
50 | ->order('start_time','desc') | 50 | ->order('start_time','desc') |
51 | ->paginate(10)->each(function ($item){ | 51 | ->paginate(10)->each(function ($item){ |
52 | - $item['time']=($item['end_time']-$item['start_time']); | 52 | + $item['time']=ceil(($item['end_time']-$item['start_time'])/3600); |
53 | return $item; | 53 | return $item; |
54 | }); | 54 | }); |
55 | $this->assign('data',$data); | 55 | $this->assign('data',$data); |
-
请 注册 或 登录 后发表评论