ai推荐审稿人功能修改

This commit is contained in:
chengxl
2025-04-23 11:46:32 +08:00
parent 0858ffbe87
commit ccb28ce850

View File

@@ -65,6 +65,16 @@ class Recommend extends Base
//条件拼接
$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 = [];
if(!empty($aParam['field'])){//根据领域搜索
@@ -84,14 +94,9 @@ class Recommend extends Base
//查用户信息
$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)){
$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
$aArticleId = Db::name('article_author')->where('email', $sEmail)->column('article_id');
if(!empty($aArticleId)){