This commit is contained in:
wangzhaocui
2022-04-11 13:40:07 +08:00
2 changed files with 32 additions and 10 deletions

View File

@@ -177,14 +177,35 @@ class Article extends Controller {
//分页查询数据
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
$res = $this->article_obj->field('t_article.*,t_journal.title journalname')
$res = $this->article_obj
->field('t_article.*,t_journal.title journalname,t_user.email,t_user.realname,t_user.phone')
->join('t_journal', 't_journal.journal_id = t_article.journal_id', 'LEFT')
->join('t_user',"t_user.user_id = t_article.user_id",'left')
->where($where)
->order('t_article.article_id desc')
->limit($limit_start, $data['pageSize'])
->select();
//增加审稿意见信息
foreach($res as $key => $val){
$cache_review = $this->article_reviewer_obj
->where("t_article_reviewer.article_id",$val['article_id'])
->where("t_article_reviewer.state",'in',[1,2,3])
->select();
$res[$key]['review'] = $cache_review;
}
//添加国家信息
foreach($res as $k => $v){
$cache_author_list = $this->article_author_obj->where('article_id',$v['article_id'])->select();
$cache_country = [];
foreach($cache_author_list as $key => $val){
if($val['country']!=''&&!in_array($val['country'],$cache_country)){
$cache_country[] = $val['country'];
}
}
$res[$k]['countrys'] = $cache_country;
}
$count = $this->article_obj->where($where)->count();
return json(['total' => $count, 'data' => $res]);
@@ -1298,9 +1319,9 @@ class Article extends Controller {
return jsonError("Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.");
}
if($user_res['account']=='fariba'||$user_res['account']=='zc'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
}
// if($user_res['account']=='fariba'||$user_res['account']=='zc'||$user_res['account']=='Mohammad Hossein'||$user_res['account']=='xiaoyueyue'||$user_res['account']=='sethlee000'||$user_res['account']=='yuanying9908'){
// return json(['code'=>1,'msg'=>'Your account has been blocked. Please contact the publisher for details: publisher@tmrjournals.com.']);
// }
$journal_info = $this->journal_obj->where('journal_id', $data['journal'])->find();
//首先查重是否重复投稿
@@ -1684,7 +1705,8 @@ class Article extends Controller {
$data = $this->request->post();
$limit_start = ($data['pageIndex'] - 1) * $data['pageSize'];
$where['t_article_reviewer.article_id'] = $data['articleId'];
$res = $this->article_reviewer_obj->field('t_article_reviewer.*,t_user.email,t_user.account reviewer,t_user_reviewer_info.country country,t_user_reviewer_info.field,t_user_reviewer_info.company,t_reviewer_major.title major_title,t_reviewer_major.ctitle major_ctitle')
$res = $this->article_reviewer_obj
->field('t_article_reviewer.*,t_user.email,t_user.account reviewer,t_user_reviewer_info.country country,t_user_reviewer_info.field,t_user_reviewer_info.company,t_reviewer_major.title major_title,t_reviewer_major.ctitle major_ctitle')
->join('t_user', 't_article_reviewer.reviewer_id = t_user.user_id', 'LEFT')
->join('t_user_reviewer_info', 't_article_reviewer.reviewer_id = t_user_reviewer_info.reviewer_id', 'LEFT')
->join('t_reviewer_major', 't_reviewer_major.major_id = t_user_reviewer_info.major', 'LEFT')