request->post(); $token = $params['TOKEN'] ?? ''; // todo 容错处理 $data = $servies->getRecogViewDetailByToken($token); // if(empty($data)) // { // $this->error('token失效或已过期'); // } $this->success('success', $data); } /** * 后台初始化请求 * @return void * @throws Throwable */ public function getRecogViewHrDetail(HrServies $servies): void { $params = $this->request->post(); $token = $params['TOKEN'] ?? ''; // todo 容错处理 $data = $servies->getRecogViewDetailByToken($token,1); // if(empty($data)) // { // $this->error('token失效或已过期'); // } $this->success('success', $data); } /** * @throws ModelNotFoundException * @throws DataNotFoundException * @throws DbException */ public function saveRecogViewDetail(HrServies $servies): void { $params = $this->request->post(); $HR_RECORDS = $params['HR_RECORDS'] ?? array(); $TOKEN = $params['TOKEN'] ?? ''; $servies->saveRecogViewDetail($HR_RECORDS, $TOKEN); $this->success('success'); } public function getNoHrReasonList(): void { $model = new Commondata(); $res = $model ->field(['code','name']) ->where('type', '7') ->where('status', 1) ->order('weigh asc, id asc') ->select() ->toArray(); $this->success('', ['list' => $res]); } }