Browse Source

no message

wzh 5 năm trước cách đây
mục cha
commit
0d19b5386d
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      api/application/controllers/Lampcontrol.php

+ 3 - 3
api/application/controllers/Lampcontrol.php

@@ -1428,12 +1428,12 @@ class Lampcontrol extends Base_Controller {
             $update['updatetime']       = date("Y-m-d H:i:s");
             $update['nextquerytime']    = date("Y-m-d H:i:s");
 
-            $ret = $this->Patrol_model->getOne($where['id']);
+            $ret = $this->Patrol_model->get_one($where);
             if(empty($ret)){
                 $update['id'] = $where['id'];
-                $this->Patrol_model->insert($update);
+                $this->Patrol_model->add($update);
             } else {
-                $this->Patrol_model->update($where,$update);
+                $this->Patrol_model->update($update,$where);
             }
             $res = $this->Lamp_model->getOne($lampid,'N.protocoltype,L.address,L.protocoltype AS lampprotocoltype');
             if ($res['protocoltype'] == 4) {