成为编委或青年编委的同时添加审稿人关系

This commit is contained in:
wangjinlei
2026-05-25 16:54:46 +08:00
parent ab7f08b06c
commit 2c94e28f1a
3 changed files with 31 additions and 2 deletions

View File

@@ -567,6 +567,8 @@ class Board extends Base {
return jsonError($rule->getError());
}
$check = $this->board_to_journal_obj->where('user_id',$data['user_id'])->where('state',0)->find();
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
$user_info = $this->user_obj->where('user_id',$data['user_id'])->find();
if($check){
return jsonError("According to TMR Publishing Group Policy, scientists are not allowed to serve on the editorial board of more than one journal at the same time.");
}
@@ -578,6 +580,18 @@ class Board extends Base {
$insert['board_group_id'] = $data['board_group_id'];
$insert['research_areas'] = trim($data['research_areas']);
$this->board_to_journal_obj->insert($insert);
$reviewer_journal = $this->reviewer_to_journal_obj->where("reviewer_id",$user_info['user_id'])->where("journal_id",$journal_info['journal_id'])->find();
if(!$reviewer_journal){
$insert_reviewer['reviewer_id'] = $user_info['user_id'];
$insert_reviewer['journal_id'] = $journal_info['journal_id'];
$insert_reviewer['account'] = $user_info['account'];
$insert_reviewer['journal_title'] = $journal_info['title'];
$insert_reviewer['ctime'] = time();
$this->reviewer_to_journal_obj->insert($insert_reviewer);
}
return jsonSuccess([]);
}