1
This commit is contained in:
@@ -102,17 +102,17 @@ class Journal extends Controller {
|
||||
public function getJournalsForReviewerInEditor(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
'account' => 'require',
|
||||
'editor_id' => 'require',
|
||||
'reviewer_id' => 'require'
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
|
||||
$editor_info = $this->user_obj->where('account',$data['account'])->find();
|
||||
$editor_info = $this->user_obj->where('user_id',$data['editor_id'])->find();
|
||||
$journalIds = [];
|
||||
if($editor_info['type']==2){//责任编辑
|
||||
$journalIds = $this->journal_obj->where('eidtor_id',$editor_info['user_id'])->column('journal_id');
|
||||
$journalIds = $this->journal_obj->where('editor_id',$editor_info['user_id'])->column('journal_id');
|
||||
}else{//客座编辑
|
||||
$guests = $this->user_to_special_obj->where('user_id',$data['reviewer_id'])->where('uts_state',0)->select();
|
||||
$usercontroller = new usercontroller();
|
||||
@@ -121,7 +121,7 @@ class Journal extends Controller {
|
||||
$journalIds[] = $this->journal_obj->where('issn',$c_res['journal_issn'])->value('journal_id');
|
||||
}
|
||||
}
|
||||
$njournalIds = $this->reviewer_to_journal_obj->where('reviewer_id',$data['user_id'])->where('state',0)->column('journal_id');
|
||||
$njournalIds = $this->reviewer_to_journal_obj->where('reviewer_id',$data['reviewer_id'])->where('state',0)->column('journal_id');
|
||||
$list = $this->journal_obj->where('journal_id',"not in",$njournalIds)->where('journal_id',"in",$journalIds)->where('state',0)->select();
|
||||
|
||||
$re['journals'] = $list;
|
||||
|
||||
Reference in New Issue
Block a user