From a2fb986f2632cde6a1e66644c4c89c2382a16f00 Mon Sep 17 00:00:00 2001 From: chengxl Date: Thu, 19 Jun 2025 17:27:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=8E=A8=E8=8D=90=E5=AE=A1?= =?UTF-8?q?=E7=A8=BF=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Reviewer.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/application/common/Reviewer.php b/application/common/Reviewer.php index 6c07a5d..86537d0 100644 --- a/application/common/Reviewer.php +++ b/application/common/Reviewer.php @@ -2,6 +2,7 @@ namespace app\common; use think\Db; use think\Queue; +use think\Env; //审稿人相关公共方法 class Reviewer { @@ -187,7 +188,7 @@ class Reviewer //获取审稿人信息 // 获取时间点 - $iSixMonth= strtotime('-6 months'); + $iSixMonth = strtotime(date('Y-m-d 00:00:00',strtotime('-6 months'))); // 先查询符合专业条件的审稿人ID $aWhere = ['state' => 0, 'major_id' => ['in', $aMajorId]]; @@ -379,7 +380,7 @@ class Reviewer if(in_array($value, $aReviewer)){ continue; } - $aInsert[] = ['reviewer_id' => $value,'article_id' => $iArticleId,'editor_act' => 1,'ctime' => time(),'state' => 5]; + $aInsert[] = ['reviewer_id' => $value,'article_id' => $iArticleId,'editor_act' => 1,'ctime' => time(),'state' => 5,'invited_time' => time()]; } if(empty($aInsert)){ return json_encode(['status' => 3,'msg' => 'Reviewers have been invited to review, please do not repeat the process']); @@ -483,6 +484,12 @@ class Reviewer if(empty($title) || empty($content)){ continue; } + + $pre = Env::get('emailtemplete.pre'); + $net = Env::get('emailtemplete.net'); + $net1 = str_replace("{{email}}",trim($email),$net); + $content=$pre.$content.$net1; + //发送邮件 $memail = empty($aJournal['email']) ? '' : $aJournal['email']; $mpassword = empty($aJournal['epassword']) ? '' : $aJournal['epassword']; @@ -643,6 +650,11 @@ class Reviewer if(empty($title) || empty($content)){ return json_encode(['status' => 7,'msg' => 'The email subject or content cannot be empty']); } + $pre = Env::get('emailtemplete.pre'); + $net = Env::get('emailtemplete.net'); + $net1 = str_replace("{{email}}",trim($email),$net); + $content=$pre.$content.$net1; + //发送邮件 $memail = empty($aJournal['email']) ? '' : $aJournal['email']; $mpassword = empty($aJournal['epassword']) ? '' : $aJournal['epassword'];