Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -345,6 +345,16 @@ class Journal extends Base {
|
|||||||
$update['fee'] = $data['fee'];
|
$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']):"";
|
$update['scope'] = isset($data['scope'])?trim($data['scope']):"";
|
||||||
$this->journal_obj->where('journal_id',$data['journal_id'])->update($update);
|
$this->journal_obj->where('journal_id',$data['journal_id'])->update($update);
|
||||||
|
|||||||
@@ -84,7 +84,8 @@ class Article
|
|||||||
}
|
}
|
||||||
$iAiArticleId = $aAiArticle['ai_article_id'];
|
$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 = '';
|
$sFiled = '';
|
||||||
$aUpdateParam = [];
|
$aUpdateParam = [];
|
||||||
|
|
||||||
@@ -393,4 +394,75 @@ class Article
|
|||||||
return json_encode(['status' => 1,'msg' => 'success']);
|
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 desc')->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'];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user