20201112
This commit is contained in:
@@ -662,6 +662,12 @@ class User extends Controller {
|
||||
return jsonError("user no find!");
|
||||
}
|
||||
|
||||
$check = $this->reviewer_to_journal_obj->where("journal_id",$journal_info['journal_id'])->where('reviewer_id',$user_info['user_id'])->where('state',0)->find();
|
||||
|
||||
if($check){
|
||||
return jsonError("has reviewer");
|
||||
}
|
||||
|
||||
Db::startTrans();
|
||||
|
||||
$insert_info['reviewer_id'] = $user_info['user_id'];
|
||||
@@ -711,14 +717,14 @@ class User extends Controller {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过审核人
|
||||
* 通过审稿人
|
||||
*/
|
||||
public function reviewerAdopt() {
|
||||
$reviewerId = $this->request->post('reviewerApplyId');
|
||||
$where['reviewer_apply_id'] = $reviewerId;
|
||||
$apply_info = $this->user_reviewer_obj->where($where)->find();
|
||||
$journal_info = $this->journal_obj->where('journal_id', $apply_info['journal_id'])->find();
|
||||
$has_res = $this->user_obj->where('account', $apply_info['name'])->find();
|
||||
$has_res = $this->user_obj->where('account', $apply_info['name'])->whereOr("email",$apply_info['email'])->find();
|
||||
//检测是否已经存在此审稿人
|
||||
if($has_res){
|
||||
$check = $this->reviewer_to_journal_obj->where('reviewer_id',$has_res['user_id'])->where('journal_id',$journal_info['journal_id'])->where('state',0)->find();
|
||||
|
||||
Reference in New Issue
Block a user