稿件验证标题是否存在
This commit is contained in:
@@ -3428,6 +3428,17 @@ class Article extends Base
|
||||
return jsonError("Submission failed");
|
||||
}
|
||||
$article_id = $data['article_id'];
|
||||
|
||||
//查询标题是否存在
|
||||
$oArticle = new \app\common\Article;
|
||||
$aCheckTitle = $oArticle->checkTitle(['title' => $data['title'],'article_id' => $article_id,'user_id' => $data['user_id']]);
|
||||
$iStatus = empty($aCheckTitle['status']) ? -1 : $aCheckTitle['status'];
|
||||
$sMsg = empty($aCheckTitle['msg']) ? '': $aCheckTitle['msg'];
|
||||
$iDraftId = empty($aCheckTitle['draft_id']) ? 0 : $aCheckTitle['draft_id'];
|
||||
if($iStatus != 1){
|
||||
return json(['code' => $iStatus, 'msg' => $sMsg,'draft_id' => $iDraftId]);
|
||||
}
|
||||
|
||||
//添加文章基础信息
|
||||
if ($data['article_id'] == 0) {
|
||||
$checkArticle = $this->article_obj->where("title", trim($data['title']))->select();
|
||||
@@ -4616,20 +4627,10 @@ class Article extends Base
|
||||
$where['editor_id'] = $uidres[0];
|
||||
}
|
||||
$where['state'] = 0;
|
||||
$list = $this->journal_obj->where($where)->select();
|
||||
|
||||
// //获取期刊封面 chengxiaoling 20251027 start
|
||||
// if(!empty($list)){
|
||||
// $aParam = ['issn' => array_column($list, 'issn')];
|
||||
// $sUrl = 'http://journalapi.tmrjournals.com/public/index.php/';
|
||||
// $sUrl = $sUrl."api/Supplementary/getJournal";
|
||||
// $aResult = object_to_array(json_decode(myPost1($sUrl,$aParam),true));
|
||||
// $aResult = empty($aResult['data']) ? [] : array_column($aResult['data'], 'icon','issn');
|
||||
// foreach ($list as $key => $value) {
|
||||
// $list[$key]['journal_icon'] = empty($aResult[$value['issn']]) ? '' : $aResult[$value['issn']];
|
||||
// }
|
||||
// }
|
||||
// //获取期刊封面 chengxiaoling 20251027 end
|
||||
$list = $this->journal_obj
|
||||
->field("journal_id,title,issn,editorinchief,zname,abbr,alias,editor_id,staff_id,level,
|
||||
jabbr,jour_num,jour_price,email,cycle,scope,fee,kfen,website,journal_icon,apc_url,state")
|
||||
->where($where)->select();
|
||||
return json($list);
|
||||
}
|
||||
|
||||
@@ -4639,7 +4640,10 @@ class Article extends Base
|
||||
public function getJournalOutLx()
|
||||
{
|
||||
$editorid = $this->request->post('editor_id');
|
||||
$list = $this->journal_obj->where('editor_id', $editorid)->where('journal_id', 'not in', '2,3,15')->select();
|
||||
$list = $this->journal_obj
|
||||
->field("journal_id,title,issn,editorinchief,zname,abbr,alias,editor_id,staff_id,level,
|
||||
jabbr,jour_num,jour_price,email,cycle,scope,fee,kfen,website,journal_icon,apc_url,state")
|
||||
->where('editor_id', $editorid)->where('journal_id', 'not in', '2,3,15')->select();
|
||||
return json($list);
|
||||
}
|
||||
|
||||
@@ -4748,7 +4752,10 @@ class Article extends Base
|
||||
if (!$res) {
|
||||
return jsonError('no this user!');
|
||||
}
|
||||
$journals = $this->journal_obj->where('editor_id', $res['user_id'])->where('journal_id', 'in', '2,3,15')->select();
|
||||
$journals = $this->journal_obj
|
||||
->field("journal_id,title,issn,editorinchief,zname,abbr,alias,editor_id,staff_id,level,
|
||||
jabbr,jour_num,jour_price,email,cycle,scope,fee,kfen,website,journal_icon,apc_url,state")
|
||||
->where('editor_id', $res['user_id'])->where('journal_id', 'in', '2,3,15')->select();
|
||||
$re['journals'] = $journals;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user