作者 潘浩文
1 个管道 的构建 通过 耗费 0 秒

后台设备模块开发

... ... @@ -131,15 +131,25 @@ class AdminLightOrderController extends AdminBaseController
{
$id = $this->request->param('id');
$data = Db::name('light_order')
->alias('l')
->join('temple t','t.id=l.temple_id')
->where('l.id', $id)
->field('l.*,t.name as tname,t.id as tid')
->find();
$temple=Db::name('temple')->select();
$this->assign('temple',$temple);
$area=Db::name('temple_area')->where('temple_id',$data['temple_id'])->select();
$this->assign('area',$area);
->alias('lo')
->join('light l','lo.light_id=l.id')
->join('users u','lo.users_id=u.id')
->join('temple t','l.temple_id=t.id')
->join('temple_area ta','l.area_id=ta.id')
->where('lo,id',$id)
->field('lo.*,l.*,u.*,t.name as tname,ta.name as taname,lo.name as loname')
->order('lo.create_time','desc')
->paginate('10');
$data['location']=[$data['row'],$data['column']];
$address = Db::name('temple')->field('address')->distinct('true')->select();
$this->assign('address',$address);
$temple = Db::name('temple')->where('address',$data['address'])->select();
$this->assign('temple', $temple);
$area = Db::name('temple_area')->where('temple_id', $data['temple_id'])->select();
$this->assign('area', $area);
$location=json_decode($this->getLocation($id=$data['area_id'],$locationId=$data['id']),true);
$this->assign('location', $location);
$this->assign('list', $data);
return $this->fetch();
}
... ...