add(); HelpHander::success([],'操作成功'); } // 删除 public function del(){ $id = input('id/d',0); model('HouseTurn')->del($id); HelpHander::success([],'操作成功'); } // 详情 public function detail(){ $id = input('id/d',0); $ret = model('HouseTurn')->info($id); HelpHander::success($ret); } //列表 public function list(){ $page = input('page/d',1); $size = input('size/d',10); $title = input('title','','trim'); $status = input('status/d',-1); $enable = input('enable/d',-1); $lessee = input('lessee','','trim'); $vacancy = input('vacancy/d',0); $ret = model('HouseTurn')->lists($page,$size,$title,$status,$enable,$lessee,$this->userId,$this->orgId,0,$vacancy); HelpHander::success($ret); } //导出列表 public function export(){ $title = input('title','','trim'); $status = input('status/d',-1); $enable = input('enable/d',-1); $lessee = input('lessee','','trim'); $vacancy = input('vacancy/d',0); $ret = model('HouseTurn')->export($title,$status,$enable,$lessee,$this->userId,$this->orgId,$vacancy); HelpHander::success($ret); } public function uhlist(){ $page = input('page/d',1); $size = input('size/d',10); $title = input('title','','trim'); $status = input('status/d',-1); $lessee = input('lessee','','trim'); $startTime = input('startTime','','trim'); $endTime = input('endTime','','trim'); $ret = model('HouseTurn')->uhlists($page,$size,$title,$status,$lessee,$this->userId,$this->orgId,$startTime,$endTime); HelpHander::success($ret); } public function changeStatus(){ $id = input('id/d',0); $sImg = input('sImg','','trim'); $sRemark = input('sRemark','','trim'); if($id <= 0){ HelpHander::error('参数错误'); } if(!$sImg){ HelpHander::error('未上传说明文件'); } $ret = model('HouseTurn')->changeStatus($id,$sImg,$sRemark); HelpHander::success($ret); } public function changeType(){ $id = input('id/d',0); $type = input('type/d',0); if($id <= 0){ HelpHander::error('参数错误'); } $ret = Db::name('house_turn')->where('id',$id)->update(['type' => $type]); halt($ret);exit(); if(!$ret){ HelpHander::error('操作失败'); } HelpHander::success($ret); } }