20201112
This commit is contained in:
@@ -1154,6 +1154,31 @@ class Journal extends Controller {
|
||||
Queue::push('app\api\job\mail@fire', $maidata, "mail");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取期刊主页分期信息
|
||||
* @description 获取期刊主页分期信息
|
||||
* @author wangjinlei
|
||||
* @url /api/Journal/getMainPageStages
|
||||
* @method POST
|
||||
*
|
||||
* @param name:journal_id type:int require:1 desc:期刊id
|
||||
*
|
||||
* @return stages:分期信息#
|
||||
*/
|
||||
public function getMainPageStages(){
|
||||
$data = $this->request->post();
|
||||
$frag=[];
|
||||
$list = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('stage_year', date("Y"))->where('is_publish',1)->where('state',0)->order("stage_no desc")->select();
|
||||
if(count($list)==0){
|
||||
$frag = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('stage_year', date("Y",strtotime("-1 year")))->where('is_publish',1)->where('state',0)->order("stage_no desc")->select();
|
||||
}else{
|
||||
$frag = $list;
|
||||
}
|
||||
|
||||
$re['stages'] = $frag;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 添加期刊话题订阅(批量)
|
||||
|
||||
Reference in New Issue
Block a user