model = new \app\common\model\DeviceRecord(); } public function add(){ $json = [ 'images'=>input('images'), 'content'=>input('content'), 'deviceId'=>input('deviceId'), 'userId'=>$this->userId, 'orgId'=>$this->orgId, 'checkJson'=>input('checkJson'), 'taskId'=>input('taskId'), 'video'=>input('video') ]; $ret = $this->model->add($json); if($ret){ HelpHander::success($ret,'添加成功'); }else{ HelpHander::error($this->model->getError()); } } public function queryRecordList(){ $page = input('page',1); $size = input('size',10); $deviceId = input('deviceId/d',0); $type = input('type/d',0); $model = $this->model; $ret = $model->lists($page,$size,$deviceId,$this->userId,$this->orgId,$type); HelpHander::success($ret); } public function queryRecordDetails(){ $id = input('deviceRecordId/d',0); $model = $this->model; $ret = $model->details($id); if($ret){ HelpHander::success($ret); }else{ HelpHander::error('参数错误'); } } }