orgId]; $lists = Db::name('device_task_delay') ->where($map) ->page($page,$size) ->order('id desc') ->select(); foreach ($lists as $k=>$v){ $taskTitle = Db::name('device_task')->where('id',$v['task_id'])->value('title'); $lists[$k]['task_title'] = $taskTitle?$taskTitle:''; $lists[$k]['end_time'] = date('Y-m-d H:i',strtotime($v['end_time'])); $lists[$k]['uname'] = Db::name('user')->where('id',$v['user_id'])->value('real_name'); $lists[$k]['deal_user'] = ''; if($v['deal_user_id'] > 0){ $lists[$k]['deal_user'] = Db::name('user')->where('id',$v['deal_user_id'])->value('real_name'); } } HelpHander::success($lists); } public function deal(){ $res = model('DeviceTask')->dealDelay($this->userId,$this->orgId); if(!$res){ HelpHander::error(model('DeviceTask')->getError()); } HelpHander::success('操作成功'); } }