This commit is contained in:
wangjinlei
2021-02-09 11:29:19 +08:00
parent d12cd7266e
commit 9c68dd26c1
4 changed files with 130 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ class Special extends Controller {
protected $journal_special_obj = '';
protected $journal_special_editor_obj = '';
protected $journal_special_to_editor_obj = '';
protected $journal_special_alert_obj = '';
protected $article_to_topic_obj = '';
protected $sys_scient_obj = '';
protected $sys_book_obj = '';
@@ -41,6 +42,7 @@ class Special extends Controller {
$this->journal_special_obj = Db::name('journal_special');
$this->journal_special_editor_obj = Db::name('journal_special_editor');
$this->journal_special_to_editor_obj = Db::name('journal_special_to_editor');
$this->journal_special_alert_obj = Db::name('journal_special_alert');
$this->article_to_topic_obj = Db::name('article_to_topic');
$this->sys_scient_obj = Db::name('system_scient');
$this->sys_book_obj = Db::name('system_books');
@@ -345,4 +347,53 @@ class Special extends Controller {
$this->journal_special_to_editor_obj->where('journal_special_to_editor_id',$data['journal_special_to_editor_id'])->update(['state'=>1]);
return jsonSuccess([]);
}
/**
* @title 客座期刊提示语(获取)
* @description 客座期刊提示语(获取)
* @author wangjinlei
* @url /master/Special/getSpecialAlert
* @method POST
*
* @param name:journal_id type:int require:1 desc:期刊id
*
* @return alertInfo:提示语信息#
*/
public function getSpecialAlert(){
$data = $this->request->post();
$info = $this->journal_special_alert_obj->where('journal_id',$data['journal_id'])->find();
if($info==null){
$insert['journal_id'] = $data['journal_id'];
$insert['agreement'] = '';
$insert['alert'] = '';
$insert['intro'] = '';
$this->journal_special_alert_obj->insert($insert);
}
$d = $this->journal_special_alert_obj->where('journal_id',$data['journal_id'])->find();
$re['alertInfo'] = $d;
return jsonSuccess($re);
}
/**
* @title 客座期刊提示语(编辑)
* @description 客座期刊提示语(编辑)
* @author wangjinlei
* @url /master/Special/editSpecialAlert
* @method POST
*
* @param name:special_alert_id type:int require:1 desc:客座提示语id
* @param name:agreement type:string require:1 desc:需知
* @param name:alert type:string require:1 desc:成功提示
* @param name:intro type:string require:1 desc:投稿简介
*/
public function editSpecialAlert(){
$data = $this->request->post();
$update['agreement'] = $data['agreement'];
$update['alert'] = $data['alert'];
$update['intro'] = $data['intro'];
$this->journal_special_alert_obj->where('special_alert_id',$data['special_alert_id'])->update($update);
return jsonSuccess([]);
}
}