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

order

@@ -31,8 +31,9 @@ class AdminFaultController extends AdminBaseController{ @@ -31,8 +31,9 @@ class AdminFaultController extends AdminBaseController{
31 public function index(){ 31 public function index(){
32 $data=Db::name('fault') 32 $data=Db::name('fault')
33 ->alias('a') 33 ->alias('a')
  34 + ->field('a.*,b.serial_number,b.hospital')
34 ->join('equipment b','a.eq_name=b.name') 35 ->join('equipment b','a.eq_name=b.name')
35 - ->order('create_time','desc') 36 + ->order('a.create_time','desc')
36 ->paginate(10); 37 ->paginate(10);
37 $this->assign('data',$data); 38 $this->assign('data',$data);
38 return $this->fetch(); 39 return $this->fetch();