diff --git a/application/api/controller/Article.php b/application/api/controller/Article.php index 98fc1c2..fdd246b 100644 --- a/application/api/controller/Article.php +++ b/application/api/controller/Article.php @@ -338,9 +338,7 @@ class Article extends Base $res[$key]['H'] = $this->getHPerson($val['article_id']); //查询文章通讯作者的账号信息 - $res[$key]['reports'] = $this->getReportAuthors($val['article_id']); - - //添加file + $res[$key]['reports'] = $this->getReportAuthors($val['article_id']);le $res_file = $this->article_file_obj->where("article_id", $val['article_id'])->select(); $file_frag = []; foreach ($res_file as $v) { diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php index 4a2f6bd..7187410 100644 --- a/application/api/controller/Reviewer.php +++ b/application/api/controller/Reviewer.php @@ -281,6 +281,46 @@ class Reviewer extends Base return jsonSuccess($re); } + public function researchUser(){ + $data = $this->request->post(); + $rule = new Validate([ + "keywords"=>"require" + ]); + if(!$rule->check($data)){ + return jsonError($rule->getError()); + } + $list = $this->user_obj->field("email,realname")->where("email","like",'%'.$data['keywords'].'%')->limit(15)->select(); + $re['list'] = $list; + return jsonSuccess($re); + } + + + + public function checkUserAndGet(){ + $data = $this->request->post(); + $rule = new Validate([ + "email"=>"require" + ]); + if(!$rule->check($data)){ + return jsonError($rule->getError()); + } + $user_info = $this->user_obj->where('email', $data['email'])->find(); + if(!$user_info){ + return jsonError("no user researched"); + } + $check = $this->user_obj + ->join('t_user_reviewer_info', 't_user_reviewer_info.reviewer_id = t_user.user_id', 'left') + ->where('t_user.email', $data['email']) + ->where('t_user.state', 0) + ->find(); + $check['majorshu'] = getMajorShu($check['major']); + $check['cvs'] = getReviewerCvs($check['user_id']); + $check['title'] = $check['technical']; + $re['result'] = $check; + return jsonSuccess($re); + + } + /** * @title 获取审稿人详情 * @description 获取审稿人详情 @@ -1556,7 +1596,15 @@ class Reviewer extends Base $info_insert['introduction'] = isset($data['introduction']) ? trim($data['introduction']) : ''; $info_insert['company'] = isset($data['company']) ? trim($data['company']) : ''; $info_insert['major'] = $data['major']; - $info_insert['qualifications'] = isset($data['cv'])?trim($data['cv']):''; + $cv = isset($data['cv'])?trim($data['cv']):''; +// $info_insert['qualifications'] = $cv; + //处理cv表 + if($cv!=''){ + $cv_obj["user_id"] = $uid; + $cv_obj["cv"] = $cv; + $cv_obj['ctime'] = time(); + $this->user_cv_obj->insert($cv_obj); + } $info_insert['field'] = trim($data['field']); $info_insert['test_from'] = "addReviewer"; $res1 = $this->user_reviewer_info_obj->insertGetId($info_insert); @@ -1625,7 +1673,17 @@ class Reviewer extends Base $info_insert['major'] = $data['major']; // $info_insert['cmajor'] = $data['cmajor']; $info_insert['field'] = trim($data['field']); - $info_insert['qualifications'] = trim($data['cv']); +// $info_insert['qualifications'] = trim($data['cv']); + $cv = isset($data['cv'])?trim($data['cv']):''; +// $info_insert['qualifications'] = $cv; + //处理cv表 + $c_cv = $this->user_cv_obj->where("user_id",$data['user_id'])->where("cv",$cv)->where("state",0)->find(); + if(!$c_cv&&$cv!=''){ + $cv_obj["user_id"] = $data['user_id']; + $cv_obj["cv"] = $cv; + $cv_obj['ctime'] = time(); + $this->user_cv_obj->insert($cv_obj); + } if ($reviewer_info == null) { $info_insert['test_from'] = "addReviewerBee"; $this->user_reviewer_info_obj->insertGetId($info_insert);