|
@@ -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) {
|