自动化任务修改

This commit is contained in:
chengxl
2025-06-18 17:49:28 +08:00
parent f90d185c79
commit 7a671116a8

View File

@@ -152,7 +152,7 @@ class Reviewer
* *
*/ */
public function get($aParam = []){ //is_send_email 是否发邮件1是2否 public function get($aParam = []){
//文章ID //文章ID
$iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id']; $iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id'];
if(empty($iArticleId)){ if(empty($iArticleId)){
@@ -188,7 +188,6 @@ class Reviewer
//获取审稿人信息 //获取审稿人信息
// 获取时间点 // 获取时间点
$iSixMonth= strtotime('-6 months'); $iSixMonth= strtotime('-6 months');
$iOneYear = strtotime('-1 year');
// 先查询符合专业条件的审稿人ID // 先查询符合专业条件的审稿人ID
$aWhere = ['state' => 0, 'major_id' => ['in', $aMajorId]]; $aWhere = ['state' => 0, 'major_id' => ['in', $aMajorId]];
@@ -232,7 +231,7 @@ class Reviewer
->join(Db::raw("({$sCompanyQuery}) company"),'company.reviewer_id = t_reviewer_to_journal.reviewer_id')->where($aWhere)->count(); ->join(Db::raw("({$sCompanyQuery}) company"),'company.reviewer_id = t_reviewer_to_journal.reviewer_id')->where($aWhere)->count();
if(empty($iCount)){ if(empty($iCount)){
return json_encode(['status' => 1,'msg' => '','data' => ['total' => 0,'lists' => [],'size' => $iSize]]); return json_encode(['status' => 1,'msg' => 'No reviewer data found that meets the criteria','data' => ['total' => 0,'lists' => [],'size' => $iSize]]);
} }
//判断页数是否超过最大分页限制 //判断页数是否超过最大分页限制
$iPageNum = ceil($iCount/$iSize); $iPageNum = ceil($iCount/$iSize);
@@ -252,8 +251,7 @@ class Reviewer
->fieldRaw(" ->fieldRaw("
CASE CASE
WHEN t_reviewer_to_journal.is_yboard = 1 AND t_reviewer_to_journal.ctime < {$iSixMonth} THEN 1 WHEN t_reviewer_to_journal.is_yboard = 1 AND t_reviewer_to_journal.ctime < {$iSixMonth} THEN 1
WHEN t_reviewer_to_journal.is_yboard = 1 AND t_reviewer_to_journal.ctime >= {$iSixMonth} AND t_reviewer_to_journal.ctime < {$iOneYear} THEN 2 ELSE 2
ELSE 3
END AS new_level END AS new_level
") ")
->where($aWhere) ->where($aWhere)