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

后台设备模块开发

@@ -139,7 +139,7 @@ class AdminLightController extends AdminBaseController @@ -139,7 +139,7 @@ class AdminLightController extends AdminBaseController
139 array_push($arr, [$r,$c]); 139 array_push($arr, [$r,$c]);
140 } 140 }
141 } 141 }
142 - $is_set = Db::name('light')->where(['area_id'=>$id])->field('row,column')->select()->toArray(); 142 + $is_set = Db::name('light')->where(['area_id'=>$id,'id'=>['neq',$this->request->param('lightId')]])->field('row,column')->select()->toArray();
143 if (!empty($lightId)) { 143 if (!empty($lightId)) {
144 $is_set = Db::name('light')->where(['area_id'=> $id,'id'=>['neq',$lightId]])->field('row,column')->select()->toArray(); 144 $is_set = Db::name('light')->where(['area_id'=> $id,'id'=>['neq',$lightId]])->field('row,column')->select()->toArray();
145 } 145 }