作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

order

@@ -34,11 +34,11 @@ class AdminOrderController extends AdminBaseController{ @@ -34,11 +34,11 @@ class AdminOrderController extends AdminBaseController{
34 $data=$Order->alias('a') 34 $data=$Order->alias('a')
35 ->field('a.*,b.serial_number,b.hospital') 35 ->field('a.*,b.serial_number,b.hospital')
36 ->join('equipment b','a.mac_address=b.mac_address') 36 ->join('equipment b','a.mac_address=b.mac_address')
37 - ->paginate(10)->items(function ($item){ 37 + ->paginate(10)->each(function ($item){
38 $item['time']=($item['end_time']-$item['start_time'])/3600; 38 $item['time']=($item['end_time']-$item['start_time'])/3600;
39 return $item; 39 return $item;
40 }); 40 });
41 - 41 + dump($data->toArray());
42 $this->assign('data',$data); 42 $this->assign('data',$data);
43 return $this->fetch(); 43 return $this->fetch();
44 } 44 }