ai推荐审稿人功能修改
This commit is contained in:
@@ -65,6 +65,16 @@ class Recommend extends Base
|
|||||||
|
|
||||||
//条件拼接
|
//条件拼接
|
||||||
$aWhere = ['state' => 0,'is_reviewer' => 1];
|
$aWhere = ['state' => 0,'is_reviewer' => 1];
|
||||||
|
|
||||||
|
//查询文章作者详情 作者和审稿人的机构不一致
|
||||||
|
$aUserInfo = Db::name('user')->field('email')->where('user_id',$aArticle['user_id'])->find();
|
||||||
|
$sEmail = empty($aUserInfo['email']) ? '' : $aUserInfo['email'];
|
||||||
|
if(!empty($sEmail)){
|
||||||
|
$aAuthor = Db::name('article_author')->field('company')->where(['article_id'=>$aArticle['article_id'],'email' => $sEmail,'state' => 0])->find();
|
||||||
|
if(empty($aAuthor)){
|
||||||
|
exit(json_encode(array('status' => 1,'msg' => 'No detailed information about the author of the article was found','data' => [])));
|
||||||
|
}
|
||||||
|
}
|
||||||
//查询审稿人的补充信息表拼接参数
|
//查询审稿人的补充信息表拼接参数
|
||||||
$aReviewerWhere = [];
|
$aReviewerWhere = [];
|
||||||
if(!empty($aParam['field'])){//根据领域搜索
|
if(!empty($aParam['field'])){//根据领域搜索
|
||||||
@@ -84,14 +94,9 @@ class Recommend extends Base
|
|||||||
//查用户信息
|
//查用户信息
|
||||||
$aWhere['user_id'] = ['in',$aMajorUser];
|
$aWhere['user_id'] = ['in',$aMajorUser];
|
||||||
|
|
||||||
//查询文章作者详情 作者和审稿人的机构不一致
|
|
||||||
$aUserInfo = Db::name('user')->field('email')->where('user_id',$aArticle['user_id'])->find();
|
|
||||||
$sEmail = empty($aUserInfo['email']) ? '' : $aUserInfo['email'];
|
|
||||||
if(!empty($sEmail)){
|
if(!empty($sEmail)){
|
||||||
$aAuthor = Db::name('article_author')->field('company')->where(['article_id'=>$aArticle['article_id'],'email' => $sEmail,'state' => 0])->find();
|
|
||||||
if(empty($aAuthor)){
|
|
||||||
exit(json_encode(array('status' => 1,'msg' => 'No detailed information about the author of the article was found','data' => [])));
|
|
||||||
}
|
|
||||||
//查询该用户关联的文章ID
|
//查询该用户关联的文章ID
|
||||||
$aArticleId = Db::name('article_author')->where('email', $sEmail)->column('article_id');
|
$aArticleId = Db::name('article_author')->where('email', $sEmail)->column('article_id');
|
||||||
if(!empty($aArticleId)){
|
if(!empty($aArticleId)){
|
||||||
|
|||||||
Reference in New Issue
Block a user