审稿人推荐调整
This commit is contained in:
@@ -210,12 +210,20 @@ class Reviewer
|
|||||||
$sMajorQuery = Db::name('major_to_user')->field('user_id')->where($aWhere)->buildSql();
|
$sMajorQuery = Db::name('major_to_user')->field('user_id')->where($aWhere)->buildSql();
|
||||||
|
|
||||||
// 查询符合公司条件的审稿人ID,确保去重
|
// 查询符合公司条件的审稿人ID,确保去重
|
||||||
$aWhere = ['state' => 0, 'company' => ['<>', $sCompany]];
|
$aWhere = ['state' => 0];
|
||||||
|
if(!empty($sCompany)){
|
||||||
|
$aWhere['company'] = ['<>',$sCompany];
|
||||||
|
}
|
||||||
if(!empty($aAuthorCompany)){
|
if(!empty($aAuthorCompany)){
|
||||||
array_push($aAuthorCompany, $sCompany);
|
array_push($aAuthorCompany, $sCompany);
|
||||||
$aAuthorCompany = array_unique($aAuthorCompany);
|
$aAuthorCompany = array_unique($aAuthorCompany);
|
||||||
|
$aAuthorCompany = array_filter($aAuthorCompany, function($v) {
|
||||||
|
return trim((string)$v) !== '';
|
||||||
|
});
|
||||||
|
if(!empty($aAuthorCompany)){
|
||||||
$aWhere['company'] = ['not in', $aAuthorCompany];
|
$aWhere['company'] = ['not in', $aAuthorCompany];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(!empty($aBlack) && !empty($aParam['not_choose_id'])){
|
if(!empty($aBlack) && !empty($aParam['not_choose_id'])){
|
||||||
$aBlack = array_unique(array_merge($aBlack, $aParam['not_choose_id']));
|
$aBlack = array_unique(array_merge($aBlack, $aParam['not_choose_id']));
|
||||||
$aWhere['reviewer_id'] = ['not in',$aBlack];
|
$aWhere['reviewer_id'] = ['not in',$aBlack];
|
||||||
|
|||||||
Reference in New Issue
Block a user