From 97f4cb801296f3a4ef6313d890ad89303ec22fc7 Mon Sep 17 00:00:00 2001 From: chengxl Date: Tue, 6 Jan 2026 11:05:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E9=AA=8C=E8=AF=81=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Article.php | 71 ++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/application/common/Article.php b/application/common/Article.php index f731f6e..136ef48 100644 --- a/application/common/Article.php +++ b/application/common/Article.php @@ -393,4 +393,75 @@ class Article return json_encode(['status' => 1,'msg' => 'success']); } + /** + * 验证标题是否重复 + */ + public function checkTitle($aParam = []){ + //文章ID + $iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id']; + //文章标题 + $sTitle = empty($aParam['title']) ? '' : $aParam['title']; + if(empty($sTitle)){ + return ['status' => 2,'msg' => 'The article title is empty']; + } + //作者ID + $iUserId = empty($aParam['user_id']) ? 0 : $aParam['user_id']; + //查询标题是否存在 + $aWhere = ['title' => trim($sTitle)]; + $aArticle = Db::name('article')->field('article_id,user_id,state,accept_sn')->where($aWhere)->order('article_id asc')->select(); + if(empty($aArticle)){ + return ['status' => 1,'msg' => 'No articles with relevant titles found']; + } + + //处理数据 + $aFlag = []; + $iDraftId = 0; + foreach ($aArticle as $key => $value) { + if(!empty($iArticleId) && $value['article_id'] == $iArticleId){ + continue; + } + //稿件提交者 + $iArticleUserId = empty($value['user_id']) ? 0 : $value['user_id']; + //稿件状态 + $iState = empty($value['state']) ? '' : $value['state']; + //稿号 + $sAcceptSn = empty($value['accept_sn']) ? '' : $value['accept_sn']; + if($iState == 3 && stripos($sAcceptSn, 'Draft') === 0){//自己删除草稿箱稿件 + continue; + } + if($iArticleUserId != $iUserId){//与其他作者的文章标题重名 + $aFlag[] = 2; + break; + }else{ + if($iState == 3){//编辑已拒绝文章 + $aFlag[] = 3; + break; + }elseif($iState == -1){//其他状态 + $aFlag[] = 4; + $iDraftId = $value['article_id']; + }else{ + $aFlag[] = 5; + break; + } + } + } + //返回数据 + $aFlag = empty($aFlag) ? [] : array_unique($aFlag); + $sMsg = ''; + if(empty($aFlag)){ + return ['status' => 1,'msg' => 'Enter the data processing flow']; + } + if(in_array(2, $aFlag) || in_array(5, $aFlag)){ + $sMsg = 'Please note that the manuscript with the same title is already under processing. Do not submit it again.'; + return ['status' => 20,'msg' => $sMsg]; + }elseif(in_array(3, $aFlag)){ + $sMsg = 'Please note that the manuscript with the same title has already been rejected. For more details, please contact the journal.'; + return ['status' => 21,'msg' => $sMsg]; + }elseif(in_array(4, $aFlag)){ + $sMsg = 'Please notice that the manuscript with the same title is already in the draft status. please click here'; + return ['status' => 22,'msg' => $sMsg,'draft_id' => $iDraftId]; + }else{ + return ['status' => 1,'msg' => 'Enter the data processing flow']; + } + } } From bc0e2fb9a503523fa6d40667d0e45f00a6ba5ce0 Mon Sep 17 00:00:00 2001 From: chengxl Date: Tue, 6 Jan 2026 11:06:22 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9C=9F=E5=88=8A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=94=B6=E8=B4=B9=E8=AF=B4=E6=98=8E=E5=8F=8A=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Journal.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/api/controller/Journal.php b/application/api/controller/Journal.php index 897a9e2..16948da 100644 --- a/application/api/controller/Journal.php +++ b/application/api/controller/Journal.php @@ -345,6 +345,16 @@ class Journal extends Base { $update['fee'] = $data['fee']; } + //新增字段 收费说明及链接 20260104 start + //收费链接 + if(isset($data['apc_url'])){ + $update['apc_url'] = trim($data['apc_url']); + } + //收费说明 + if(isset($data['apc_content'])){ + $update['apc_content'] = trim($data['apc_content']); + } + //新增字段 收费说明及链接 20260104 end $update['scope'] = isset($data['scope'])?trim($data['scope']):""; $this->journal_obj->where('journal_id',$data['journal_id'])->update($update); From dac50b4382ccdb629b2c20836ce02a7ca2570cd0 Mon Sep 17 00:00:00 2001 From: chengxl Date: Tue, 6 Jan 2026 11:10:52 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E9=AA=8C=E8=AF=81=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Article.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/common/Article.php b/application/common/Article.php index 136ef48..f39e130 100644 --- a/application/common/Article.php +++ b/application/common/Article.php @@ -408,7 +408,7 @@ class Article $iUserId = empty($aParam['user_id']) ? 0 : $aParam['user_id']; //查询标题是否存在 $aWhere = ['title' => trim($sTitle)]; - $aArticle = Db::name('article')->field('article_id,user_id,state,accept_sn')->where($aWhere)->order('article_id asc')->select(); + $aArticle = Db::name('article')->field('article_id,user_id,state,accept_sn')->where($aWhere)->order('article_id desc')->select(); if(empty($aArticle)){ return ['status' => 1,'msg' => 'No articles with relevant titles found']; } From 603869a65153b252e0129533eee5134d72361a4e Mon Sep 17 00:00:00 2001 From: chengxl Date: Tue, 6 Jan 2026 13:13:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E9=AA=8C=E8=AF=81=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/Article.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/common/Article.php b/application/common/Article.php index f39e130..005dbcf 100644 --- a/application/common/Article.php +++ b/application/common/Article.php @@ -84,7 +84,8 @@ class Article } $iAiArticleId = $aAiArticle['ai_article_id']; //必填参数验证 - $aFields = ['article_id','article_type','media_type','journal_id','journal_issn','title_english','covered','title_chinese','digest','research_background','discussion','research_method','conclusion','overview','summary','is_generate']; + // $aFields = ['article_id','article_type','media_type','journal_id','journal_issn','title_english','covered','title_chinese','digest','research_background','discussion','research_method','conclusion','overview','summary','is_generate']; + $aFields = ['article_id','article_type','media_type','journal_id','journal_issn','title_english','title_chinese','covered','research_method','digest','research_background','overview','summary','conclusion','is_generate']; $sFiled = ''; $aUpdateParam = [];