From 3446410d2e6408cefb49b54dba8c672bfc364f6b Mon Sep 17 00:00:00 2001 From: chengxl Date: Mon, 17 Nov 2025 12:25:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Reviewer.php | 63 ++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/application/api/controller/Reviewer.php b/application/api/controller/Reviewer.php index c101465..2977393 100644 --- a/application/api/controller/Reviewer.php +++ b/application/api/controller/Reviewer.php @@ -945,11 +945,32 @@ class Reviewer extends Base $insert_data['is_anonymous'] = isset($data['is_anonymous']) ? $data['is_anonymous'] : 0; if ($data['rev_qu_id'] == '') { //新增 $insert_data['ctime'] = time(); - $res = $this->article_reviewer_question_obj->insert($insert_data); + $res = $this->article_reviewer_question_obj->insertGetId($insert_data); } else { //更新 $res = $this->article_reviewer_question_obj->where('rev_qu_id', $data['rev_qu_id'])->update($insert_data); } + //更新文章用户最新操作状态 chengxiaoling start 20251113 + $iArticleId = empty($art_rev_info['article_id']) ? 0 : $art_rev_info['article_id']; + if(!empty($iArticleId)){ + //更新状态 + $aUpdate = ['is_user_act' => 1,'user_update_time' => time()]; + $aArticleWhere = ['article_id' => $iArticleId]; + $article_result = Db::name('article')->where($aArticleWhere)->limit(1)->update($aUpdate); + //用户操作日志 + $oUserActLog = new \app\common\UserActLog; + $iActId = empty($data['rev_qu_id']) ? 0 : $data['rev_qu_id']; + if(empty($iActId)){ + $iActId = empty($res) ? 0 : $res; + } + if(!empty($iActId)){ + $aUserLog = ['article_id' => $iArticleId,'type' => 1,'act_p_id' => empty($art_rev_info['art_rev_id']) ? 0 : $art_rev_info['art_rev_id'],'act_id' => $iActId,'user_id' => empty($art_rev_info['reviewer_id']) ? 0 : $art_rev_info['reviewer_id'],'content' => 'The initial review of the manuscript has been completed']; + $aAddResult = $oUserActLog->addLog($aUserLog); + } + + } + //更新文章用户最新操作状态 chengxiaoling end 20251113 + //根据recommend问题,改变此实例的状态,并且更改act消息提醒状态 if ($data['recommend'] == 1) { $artrevstate = 3; @@ -1110,6 +1131,24 @@ class Reviewer extends Base $this->article_reviewer_obj->where("art_rev_id",$repeat_info['art_rev_id'])->update(['state'=>$state]); } + //更新文章用户最新操作状态 chengxiaoling start 20251113 + $iArticleId = empty($art_info['article_id']) ? 0 : $art_info['article_id']; + if(!empty($iArticleId)){ + //更新状态 + $aUpdate = ['is_user_act' => 1,'user_update_time' => time()]; + $aArticleWhere = ['article_id' => $iArticleId]; + $article_result = Db::name('article')->where($aArticleWhere)->limit(1)->update($aUpdate); + //用户操作日志 + $oUserActLog = new \app\common\UserActLog; + $iActId = empty($data['art_rev_rep_id']) ? 0 : $data['art_rev_rep_id']; + if(!empty($iActId)){ + $aUserLog = ['article_id' => $iArticleId,'type' => 2,'act_p_id' => empty($repeat_info['art_rev_id']) ? 0 : $repeat_info['art_rev_id'],'act_id' => $iActId,'user_id' => empty($art_info['reviewer_id']) ? 0 : $art_info['reviewer_id'],'content' => 'Manuscript review completed']; + $aAddResult = $oUserActLog->addLog($aUserLog); + } + + } + //更新文章用户最新操作状态 chengxiaoling end 20251113 + //复审后发送邮件 //增加usermsg @@ -2607,10 +2646,30 @@ class Reviewer extends Base $rev_qu_id = empty($data['rev_qu_id']) ? 0 : $data['rev_qu_id']; if (empty($rev_qu_id)) { //新增 $insert_data['ctime'] = time(); - $res = $this->article_reviewer_question_obj->insert($insert_data); + $res = $this->article_reviewer_question_obj->insertGetId($insert_data); } else { //更新 $res = $this->article_reviewer_question_obj->where('rev_qu_id', $rev_qu_id)->update($insert_data); } + //更新文章用户最新操作状态 chengxiaoling start 20251113 + $iArticleId = empty($art_rev_info['article_id']) ? 0 : $art_rev_info['article_id']; + if(!empty($iArticleId)){ + //更新状态 + $aUpdate = ['is_user_act' => 1,'user_update_time' => time()]; + $aArticleWhere = ['article_id' => $iArticleId]; + $article_result = Db::name('article')->where($aArticleWhere)->limit(1)->update($aUpdate); + //用户操作日志 + $oUserActLog = new \app\common\UserActLog; + $iActId = empty($data['rev_qu_id']) ? 0 : $data['rev_qu_id']; + if(empty($iActId)){ + $iActId = empty($res) ? 0 : $res; + } + if(!empty($iActId)){ + $aUserLog = ['article_id' => $iArticleId,'type' => 1,'act_p_id' => empty($art_rev_info['art_rev_id']) ? 0 : $art_rev_info['art_rev_id'],'act_id' => $iActId,'user_id' => empty($art_rev_info['reviewer_id']) ? 0 : $art_rev_info['reviewer_id'],'content' => 'The initial review of the manuscript has been completed']; + $aAddResult = $oUserActLog->addLog($aUserLog); + } + + } + //更新文章用户最新操作状态 chengxiaoling end 20251113 //根据recommend问题,改变此实例的状态,并且更改act消息提醒状态 $artrevstate = 2;