20201112
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\master\controller;
|
||||
|
||||
use think\Controller;
|
||||
use think\Db;
|
||||
use think\Queue;
|
||||
|
||||
/**
|
||||
* @title 期刊接口
|
||||
@@ -25,6 +26,8 @@ class Journal extends Controller {
|
||||
protected $journal_cfp_obj = '';
|
||||
protected $journal_paper_obj = '';
|
||||
protected $journal_paper_art_obj = '';
|
||||
protected $subscribe_journal_obj = '';
|
||||
protected $subscribe_topic_obj = '';
|
||||
|
||||
public function __construct(\think\Request $request = null) {
|
||||
parent::__construct($request);
|
||||
@@ -41,6 +44,8 @@ class Journal extends Controller {
|
||||
$this->journal_cfp_obj = Db::name('journal_cfp');
|
||||
$this->journal_paper_obj = Db::name('journal_paper');
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
$this->subscribe_journal_obj = Db::name('subscribe_journal');
|
||||
$this->subscribe_topic_obj = Db::name('subscribe_topic');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -744,7 +749,12 @@ class Journal extends Controller {
|
||||
*/
|
||||
public function editStage(){
|
||||
$data = $this->request->post();
|
||||
$old = $this->journal_stage_obj->where('journal_stage_id',$data['journal_stage_id'])->find();
|
||||
$res = $this->journal_stage_obj->update($data);
|
||||
//是否提醒订阅者
|
||||
if($old['is_publish']==0&&$data['is_publish']==1){
|
||||
$this->msg_subscript_journal($old['journal_id']);
|
||||
}
|
||||
if($res){
|
||||
return json(['code'=>0,'msg'=>'success']);
|
||||
}else{
|
||||
@@ -752,6 +762,13 @@ class Journal extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
private function msg_subscript_journal($journal_id){
|
||||
$list = $this->subscribe_journal_obj->where('journal_id',$journal_id)->where('state',0)->select();
|
||||
foreach ($list as $v){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 增加期刊消息
|
||||
* @description 增加期刊消息
|
||||
|
||||
Reference in New Issue
Block a user