queueAutoRefreshRepository = $queueAutoRefreshRepository; } public function getQueuAutoRefresh($pid, $utype) { $where['pid'] = $pid; $where['utype'] = $utype; $res = $this->queueAutoRefreshRepository->findData($where); $status = false; $refresh_start = ''; $refresh_end = ''; $id = ''; if($res){ if($res->refreshtime>=time() && $res->start_time){ $status = true; $refresh_start = date('Y-m-d', $res->start_time); $refresh_end = date('Y-m-d', $res->refreshtime); $id = $res->id; } } return ['status'=>$status,'refresh_start'=>$refresh_start,'refresh_end'=>$refresh_end,'id'=>$id]; } public function delRefreshResume($id,$user) { if(!$id) { throw new ResponseException('参数错误!'); } $autoRefresh = $this->queueAutoRefreshRepository->findData(['id'=>$id]); if(!$autoRefresh) { throw new ResponseException('简历不存在!'); } if($autoRefresh->uid != $user->id) { throw new ResponseException('对不起,您只能操作自己的简历!'); } return $this->queueAutoRefreshRepository->delRefreshResume(['id'=>$id]); } }