20201112
This commit is contained in:
@@ -119,12 +119,13 @@ class Journal extends Controller {
|
|||||||
* @title 获取期刊推广文章
|
* @title 获取期刊推广文章
|
||||||
* @description 获取期刊推广文章
|
* @description 获取期刊推广文章
|
||||||
* @author wangjinlei
|
* @author wangjinlei
|
||||||
* @url /api/Journal/getJournalTopic
|
* @url /api/Journal/getJournalArticles
|
||||||
* @method POST
|
* @method POST
|
||||||
*
|
*
|
||||||
* @param name:journal_id type:int require:1 desc:期刊id
|
* @param name:journal_id type:int require:1 desc:期刊id
|
||||||
*
|
*
|
||||||
* @return articleList:期刊话题列表array#
|
* @return articleList:期刊话题列表array#
|
||||||
|
* @return stage:当前分期信息array#
|
||||||
*/
|
*/
|
||||||
public function getJournalArticles(){
|
public function getJournalArticles(){
|
||||||
$data = $this->request->post();
|
$data = $this->request->post();
|
||||||
@@ -133,16 +134,44 @@ class Journal extends Controller {
|
|||||||
->where('state',0)
|
->where('state',0)
|
||||||
->order('article_id desc')
|
->order('article_id desc')
|
||||||
->select();
|
->select();
|
||||||
// $publish_list = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->column('journal_stage_id');
|
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$journal_info['publish_stage_id'])->find();
|
||||||
// $list = $this->article_obj
|
return json(['code'=>0,'msg'=>'success','data'=>['stage'=>$stage_info,'articleList'=>$list]]);
|
||||||
// ->where('journal_id',$data['journal_id'])
|
|
||||||
// ->where('state',0)
|
|
||||||
// ->where('journal_stage_id','in',$publish_list)
|
|
||||||
// ->order('article_id desc')
|
|
||||||
// ->limit(10)
|
|
||||||
// ->select();
|
|
||||||
return json(['code'=>0,'msg'=>'success','data'=>['articleList'=>$list]]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 获取onlinefirst文章
|
||||||
|
* @description 获取onlinefirst文章
|
||||||
|
* @author wangjinlei
|
||||||
|
* @url /api/Journal/getOnlineArticle
|
||||||
|
* @method POST
|
||||||
|
*
|
||||||
|
* @param name:journal_id type:int require:1 desc:期刊id
|
||||||
|
*
|
||||||
|
* @return articlelist:文章列表array#
|
||||||
|
*/
|
||||||
|
public function getOnlineArticle(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$stages = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('is_publish',0)->where('state',0)->column('journal_stage_id');
|
||||||
|
$list = $this->article_obj->where('journal_stage_id','in',$stages)->where('state',0)->select();
|
||||||
|
return json(['code'=>0,'msg'=>'success','data'=>['articlelist'=>$list]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 获取news文章
|
||||||
|
* @description 获取news文章
|
||||||
|
* @author wangjinlei
|
||||||
|
* @url /api/Journal/getNewsArticle
|
||||||
|
* @method POST
|
||||||
|
*
|
||||||
|
* @param name:journal_id type:int require:1 desc:期刊id
|
||||||
|
*
|
||||||
|
* @return articlelist:文章列表array#
|
||||||
|
*/
|
||||||
|
public function getNewsArticle(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$stages = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('is_publish',0)->where('state',0)->column('journal_stage_id');
|
||||||
|
$list = $this->article_obj->where('journal_stage_id','in',$stages)->where('state',0)->where('type','News','Comment','or')->order('article_id')->select();
|
||||||
|
return json(['code'=>0,'msg'=>'success','data'=>['articlelist'=>$list]]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user