接口调整

This commit is contained in:
chengxl
2025-11-17 12:25:15 +08:00
parent bbcb8ec87a
commit 3446410d2e

View File

@@ -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;