20201112
This commit is contained in:
@@ -10,12 +10,14 @@ use think\Db;
|
||||
* @description 期刊web相关操作
|
||||
* @group 期刊web相关
|
||||
*/
|
||||
class Journal extends Controller {
|
||||
class Journal extends Controller {
|
||||
|
||||
//put your code here
|
||||
protected $admin_obj = '';
|
||||
protected $journal_obj = '';
|
||||
protected $article_obj = '';
|
||||
protected $article_author_obj = '';
|
||||
protected $article_ltai_obj = '';
|
||||
protected $journal_topic_obj = '';
|
||||
protected $journal_stage_obj = '';
|
||||
protected $journal_notices_obj = '';
|
||||
@@ -31,6 +33,7 @@ class Journal extends Controller {
|
||||
$this->journal_obj = Db::name('journal');
|
||||
$this->article_obj = Db::name('article');
|
||||
$this->article_author_obj = Db::name('article_author');
|
||||
$this->article_ltai_obj = Db::name('article_ltai');
|
||||
$this->journal_topic_obj = Db::name('journal_topic');
|
||||
$this->journal_stage_obj = Db::name('journal_stage');
|
||||
$this->journal_notices_obj = Db::name('journal_notices');
|
||||
@@ -40,7 +43,7 @@ class Journal extends Controller {
|
||||
$this->journal_paper_obj = Db::name('journal_paper');
|
||||
$this->journal_paper_art_obj = Db::name('journal_paper_art');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊列表
|
||||
* @description 获取期刊列表
|
||||
@@ -52,17 +55,17 @@ class Journal extends Controller {
|
||||
* @return journalList:期刊列表@
|
||||
* @journalList title:标题 issn:issn editorinchief:editorinchief acceptance:acceptance finaldecision:finaldecision apc:apc
|
||||
*/
|
||||
public function getJournalList(){
|
||||
public function getJournalList() {
|
||||
$where['j_journal.state'] = 0;
|
||||
$res = $this->journal_obj
|
||||
->field('j_journal.*,j_admin.realname realname')
|
||||
->join('j_admin','j_admin.admin_id = j_journal.editor_id','LEFT')
|
||||
->join('j_admin', 'j_admin.admin_id = j_journal.editor_id', 'LEFT')
|
||||
->where($where)
|
||||
->order(['j_journal.sort desc','j_journal.journal_id'])
|
||||
->order(['j_journal.sort desc', 'j_journal.journal_id'])
|
||||
->select();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['journalList'=>$res]]);
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['journalList' => $res]]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊信息
|
||||
* @description 获取期刊信息
|
||||
@@ -76,14 +79,14 @@ class Journal extends Controller {
|
||||
* @return journalAbs:期刊外链信息array#
|
||||
* @return journalstage:期刊分期信息array#
|
||||
*/
|
||||
public function getJournal(){
|
||||
public function getJournal() {
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$absList = $this->journal_abs_obj->where('journal_id',$data['journal_id'])->where('state',0)->order('journal_abstracting_id')->select();
|
||||
$stageList = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('is_publish',1)->where('state',0)->order('journal_stage_id desc')->select();
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['journal'=>$journal_info,'journalAbs'=>$absList,'journalStage'=>$stageList]]);
|
||||
$journal_info = $this->journal_obj->where('journal_id', $data['journal_id'])->find();
|
||||
$absList = $this->journal_abs_obj->where('journal_id', $data['journal_id'])->where('state', 0)->order('journal_abstracting_id')->select();
|
||||
$stageList = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('is_publish', 1)->where('state', 0)->order('journal_stage_id desc')->select();
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['journal' => $journal_info, 'journalAbs' => $absList, 'journalStage' => $stageList]]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊话题
|
||||
* @description 获取期刊话题
|
||||
@@ -95,36 +98,37 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return topicList:期刊话题列表array#
|
||||
*/
|
||||
public function getJournalTopic(){
|
||||
public function getJournalTopic() {
|
||||
$data = $this->request->post();
|
||||
$res = $this->journal_topic_obj
|
||||
->where('journal_id',$data['journal_id'])
|
||||
->where('state',0)
|
||||
->where('journal_id', $data['journal_id'])
|
||||
->where('state', 0)
|
||||
->select();
|
||||
//处理数组
|
||||
$frag = [];
|
||||
foreach ($res as $v){
|
||||
if($v['parent_id'] == 0){
|
||||
$frag[] = $v;
|
||||
}
|
||||
foreach ($res as $v) {
|
||||
if ($v['parent_id'] == 0) {
|
||||
$frag[] = $v;
|
||||
}
|
||||
}
|
||||
foreach ($frag as $kk => $vv){
|
||||
$frag[$kk] = $this->getChieldarr($vv,$res);
|
||||
foreach ($frag as $kk => $vv) {
|
||||
$frag[$kk] = $this->getChieldarr($vv, $res);
|
||||
}
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['topicList'=>$frag]]);
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['topicList' => $frag]]);
|
||||
}
|
||||
private function getChieldarr($vv,$res){
|
||||
if($vv['is_final']==1){
|
||||
|
||||
private function getChieldarr($vv, $res) {
|
||||
if ($vv['is_final'] == 1) {
|
||||
return $vv;
|
||||
}
|
||||
foreach ($res as $v){
|
||||
if($v['parent_id'] == $vv['journal_topic_id']){
|
||||
foreach ($res as $v) {
|
||||
if ($v['parent_id'] == $vv['journal_topic_id']) {
|
||||
$vv['children'][] = $this->getChieldarr($v, $res);
|
||||
}
|
||||
}
|
||||
return $vv;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊推广文章
|
||||
* @description 获取期刊推广文章
|
||||
@@ -137,38 +141,47 @@ class Journal extends Controller {
|
||||
* @return articleList:期刊话题列表array#
|
||||
* @return stage:当前分期信息array#
|
||||
*/
|
||||
public function getJournalArticles(){
|
||||
public function getJournalArticles() {
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_obj->where('journal_id',$data['journal_id'])->find();
|
||||
$list = $this->article_obj->where('journal_stage_id',$journal_info['publish_stage_id'])
|
||||
->where('state',0)
|
||||
$journal_info = $this->journal_obj->where('journal_id', $data['journal_id'])->find();
|
||||
$list = $this->article_obj->where('journal_stage_id', $journal_info['publish_stage_id'])
|
||||
->where('state', 0)
|
||||
->order('sort asc')
|
||||
->select();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id',$journal_info['publish_stage_id'])->find();
|
||||
$stage_info = $this->journal_stage_obj->where('journal_stage_id', $journal_info['publish_stage_id'])->find();
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
foreach ($list as $k => $v) {
|
||||
//组合cite信息
|
||||
$no = $stage_info['stage_no']==0?':':'('.$stage_info['stage_no'].'):';
|
||||
$cite =$v['abbr'].'. '.$v['title'].'. <i>'.$journal_info['jabbr'].'</i>. '.$stage_info['stage_year'].';'.$stage_info['stage_vol'].$no.$v['npp'].'. doi:'.$v['doi'];
|
||||
$no = $stage_info['stage_no'] == 0 ? ':' : '(' . $stage_info['stage_no'] . '):';
|
||||
$cite = $v['abbr'] . '. ' . $v['title'] . '. <i>' . $journal_info['jabbr'] . '</i>. ' . $stage_info['stage_year'] . ';' . $stage_info['stage_vol'] . $no . $v['npp'] . '. doi:' . $v['doi'];
|
||||
// $v['abbr'].' <i>'.$v['title'].'</i> '.$journal_info['jabbr'].' '.$stage_info['stage_year'].';'.$stage_info['stage_vol'].$no.$v['npp'].'. doi:'.$v['doi'];
|
||||
$list[$k]['cite'] = $cite;
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['stage'=>$stage_info,'articleList'=>$list]]);
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['stage' => $stage_info, 'articleList' => $list]]);
|
||||
}
|
||||
|
||||
private function getAuthor($article){
|
||||
|
||||
private function getAuthor($article) {
|
||||
$where['article_id'] = $article['article_id'];
|
||||
$where['state'] = 0;
|
||||
$list = $this->article_author_obj->where($where)->select();
|
||||
$frag = '';
|
||||
foreach ($list as $k=>$v){
|
||||
$frag = $frag==''?''.$v['author_name']:$frag.', '.$v['author_name'];
|
||||
foreach ($list as $k => $v) {
|
||||
$frag = $frag == '' ? '' . $v['author_name'] : $frag . ', ' . $v['author_name'];
|
||||
}
|
||||
return $frag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取onlinefirst文章
|
||||
* @description 获取onlinefirst文章
|
||||
@@ -180,25 +193,34 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return articlelist:文章列表array#
|
||||
*/
|
||||
public function getOnlineArticle(){
|
||||
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');
|
||||
$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
|
||||
->field('j_article.*,j_journal_stage.*')
|
||||
->join('j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','LEFT')
|
||||
->where('j_article.journal_stage_id','in',$stages)
|
||||
->where('j_article.state',0)
|
||||
->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
||||
->where('j_article.journal_stage_id', 'in', $stages)
|
||||
->where('j_article.state', 0)
|
||||
->select();
|
||||
|
||||
|
||||
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
foreach ($list as $k => $v) {
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['articlelist'=>$list]]);
|
||||
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['articlelist' => $list]]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取news文章
|
||||
* @description 获取news文章
|
||||
@@ -210,26 +232,35 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return articlelist:文章列表array#
|
||||
*/
|
||||
public function getNewsArticle(){
|
||||
public function getNewsArticle() {
|
||||
$data = $this->request->post();
|
||||
$stages = $this->journal_stage_obj->where('journal_id',$data['journal_id'])->where('is_publish',1)->where('state',0)->column('journal_stage_id');
|
||||
$stages = $this->journal_stage_obj->where('journal_id', $data['journal_id'])->where('is_publish', 1)->where('state', 0)->column('journal_stage_id');
|
||||
$list = $this->article_obj
|
||||
->field('j_article.*,j_journal_stage.*')
|
||||
->join('j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','LEFT')
|
||||
->where('j_article.journal_stage_id','in',$stages)
|
||||
->where('j_article.state',0)
|
||||
->where('j_article.type',['like','News'],['like','Comment'],'or')
|
||||
->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')
|
||||
->where('j_article.journal_stage_id', 'in', $stages)
|
||||
->where('j_article.state', 0)
|
||||
->where('j_article.type', ['like', 'News'], ['like', 'Comment'], 'or')
|
||||
->order('j_article.article_id')
|
||||
->select();
|
||||
|
||||
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
foreach ($list as $k => $v) {
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
|
||||
return json(['code'=>0,'msg'=>'success','data'=>['articlelist'=>$list]]);
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
return json(['code' => 0, 'msg' => 'success', 'data' => ['articlelist' => $list]]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取top前4条article
|
||||
* @description 获取top前4条article
|
||||
@@ -241,19 +272,27 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return articles:文章列表array#
|
||||
*/
|
||||
public function getTopArticle(){
|
||||
public function getTopArticle() {
|
||||
$data = $this->request->post();
|
||||
$list = $this->article_obj->field('j_article.*,j_journal_stage.*')->join('j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','LEFT')->where('j_article.journal_id',$data['journal_id'])->where('j_article.state',0)->orderRaw('j_article.cited+j_article.abs_num+j_article.pdf_num desc')->limit(4)->select();
|
||||
|
||||
$list = $this->article_obj->field('j_article.*,j_journal_stage.*')->join('j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT')->where('j_article.journal_id', $data['journal_id'])->where('j_article.state', 0)->orderRaw('j_article.cited+j_article.abs_num+j_article.pdf_num desc')->select();
|
||||
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
foreach ($list as $k => $v) {
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
|
||||
|
||||
return jsonSuccess(['articles'=>$list]);
|
||||
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
return jsonSuccess(['articles' => $list]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取消息列表
|
||||
* @description 获取消息列表
|
||||
@@ -265,12 +304,12 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return notices:消息列表array#
|
||||
*/
|
||||
public function getNotices(){
|
||||
public function getNotices() {
|
||||
$data = $this->request->post();
|
||||
$list = $this->journal_notices_obj->where('journal_id',$data['journal_id'])->where('state',0)->order('ctime desc')->select();
|
||||
return jsonSuccess(['notices'=>$list]);
|
||||
$list = $this->journal_notices_obj->where('journal_id', $data['journal_id'])->where('state', 0)->order('ctime desc')->select();
|
||||
return jsonSuccess(['notices' => $list]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取消息详情
|
||||
* @description 获取消息详情
|
||||
@@ -282,14 +321,14 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return notices:消息内容#
|
||||
*/
|
||||
public function getNoticesDetail(){
|
||||
public function getNoticesDetail() {
|
||||
$data = $this->request->post();
|
||||
$notices_info = $this->journal_notices_obj->where('journal_notices_id',$data['journal_notices_id'])->find();
|
||||
|
||||
$notices_info = $this->journal_notices_obj->where('journal_notices_id', $data['journal_notices_id'])->find();
|
||||
|
||||
$re['notices'] = $notices_info;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取highl话题文章
|
||||
* @description 获取highl话题文章
|
||||
@@ -302,28 +341,36 @@ class Journal extends Controller {
|
||||
* @return topic_info:话题详情
|
||||
* @return articlelist:文章列表array#
|
||||
*/
|
||||
public function getHighTopicArticle(){
|
||||
public function getHighTopicArticle() {
|
||||
$data = $this->request->post();
|
||||
$topic_info = $this->journal_topic_obj->where('journal_id',$data['journal_id'])->where('position','highlights')->where('state',0)->find();
|
||||
if($topic_info){
|
||||
$topic_info = $this->journal_topic_obj->where('journal_id', $data['journal_id'])->where('position', 'highlights')->where('state', 0)->find();
|
||||
if ($topic_info) {
|
||||
$list = $this->article_to_topic_obj->field('j_article.*,j_journal_stage.*')
|
||||
->join(array(['j_article','j_article.article_id = j_article_to_topic.article_id','LEFT'],['j_journal_stage','j_article.journal_stage_id = j_journal_stage.journal_stage_id','LEFT']))
|
||||
->where('j_article_to_topic.topic_id',$topic_info['journal_topic_id'])
|
||||
->where('j_article_to_topic.state',0)
|
||||
->join(array(['j_article', 'j_article.article_id = j_article_to_topic.article_id', 'LEFT'], ['j_journal_stage', 'j_article.journal_stage_id = j_journal_stage.journal_stage_id', 'LEFT']))
|
||||
->where('j_article_to_topic.topic_id', $topic_info['journal_topic_id'])
|
||||
->where('j_article_to_topic.state', 0)
|
||||
->select();
|
||||
|
||||
|
||||
//获取作者
|
||||
foreach($list as $k=>$v){
|
||||
foreach ($list as $k => $v) {
|
||||
$list[$k]['authortitle'] = $this->getAuthor($v);
|
||||
}
|
||||
|
||||
return jsonSuccess(['topic_info'=>$topic_info,'articlelist'=>$list]);
|
||||
}else{
|
||||
//标题斜体
|
||||
foreach ($list as $k => $v) {
|
||||
$caches = $this->article_ltai_obj->where('article_id', $v['article_id'])->where('state', 0)->column('content');
|
||||
$cache_title = $v['title'];
|
||||
foreach ($caches as $val) {
|
||||
$cache_title = str_replace($val, '<i>' . $val . '</i>', $cache_title);
|
||||
}
|
||||
$list[$k]['title'] = $cache_title;
|
||||
}
|
||||
|
||||
return jsonSuccess(['topic_info' => $topic_info, 'articlelist' => $list]);
|
||||
} else {
|
||||
return jsonError('no highlights');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取话题列表
|
||||
* @description 获取话题列表
|
||||
@@ -336,16 +383,16 @@ class Journal extends Controller {
|
||||
* @return oldJournal:父期刊信息 Description
|
||||
* @return journalList:话题列表array#
|
||||
*/
|
||||
public function getTopicList(){
|
||||
public function getTopicList() {
|
||||
$data = $this->request->post();
|
||||
$journal_info = $this->journal_topic_obj->where('journal_topic_id',$data['journal_topic_id'])->find();
|
||||
$list = $this->journal_topic_obj->where('parent_id',$data['journal_topic_id'])->where('state',0)->select();
|
||||
|
||||
$journal_info = $this->journal_topic_obj->where('journal_topic_id', $data['journal_topic_id'])->find();
|
||||
$list = $this->journal_topic_obj->where('parent_id', $data['journal_topic_id'])->where('state', 0)->select();
|
||||
|
||||
$re['oldJournal'] = $journal_info;
|
||||
$re['journalList'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊cfp
|
||||
* @description 获取期刊cfp
|
||||
@@ -357,14 +404,14 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return cfps:期刊cfps#
|
||||
*/
|
||||
public function getJournalCfp(){
|
||||
public function getJournalCfp() {
|
||||
$data = $this->request->post();
|
||||
$list = $this->journal_cfp_obj->where('journal_id',$data['journal_id'])->where('state',0)->select();
|
||||
|
||||
$list = $this->journal_cfp_obj->where('journal_id', $data['journal_id'])->where('state', 0)->select();
|
||||
|
||||
$re['cfps'] = $list;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊cfp详情
|
||||
* @description 获取期刊cfp详情
|
||||
@@ -376,14 +423,14 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return cfp:期刊cfp信息#
|
||||
*/
|
||||
public function getCfpDetail(){
|
||||
public function getCfpDetail() {
|
||||
$data = $this->request->post();
|
||||
$cfp_info = $this->journal_cfp_obj->where('journal_cfp_id',$data['journal_cfp_id'])->find();
|
||||
|
||||
$cfp_info = $this->journal_cfp_obj->where('journal_cfp_id', $data['journal_cfp_id'])->find();
|
||||
|
||||
$re['cfp'] = $cfp_info;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊footer
|
||||
* @description 获取期刊footer
|
||||
@@ -395,18 +442,18 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return footers:footers#
|
||||
*/
|
||||
public function getFooter(){
|
||||
public function getFooter() {
|
||||
$data = $this->request->post();
|
||||
$papers = $this->journal_paper_obj->where('journal_id',$data['journal_id'])->where('state',0)->select();
|
||||
foreach ($papers as $k => $v){
|
||||
$cache_list = $this->journal_paper_art_obj->where('journal_paper_id',$v['journal_paper_id'])->where('state',0)->select();
|
||||
$papers = $this->journal_paper_obj->where('journal_id', $data['journal_id'])->where('state', 0)->select();
|
||||
foreach ($papers as $k => $v) {
|
||||
$cache_list = $this->journal_paper_art_obj->where('journal_paper_id', $v['journal_paper_id'])->where('state', 0)->select();
|
||||
$papers[$k]['articles'] = $cache_list;
|
||||
}
|
||||
|
||||
|
||||
$re['footers'] = $papers;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 获取期刊footer文章
|
||||
* @description 获取期刊footer文章
|
||||
@@ -418,12 +465,12 @@ class Journal extends Controller {
|
||||
*
|
||||
* @return article:文章内容#
|
||||
*/
|
||||
public function getFooterArt(){
|
||||
public function getFooterArt() {
|
||||
$data = $this->request->post();
|
||||
$article = $this->journal_paper_art_obj->where('journal_paper_art_id',$data['journal_paper_art_id'])->find();
|
||||
|
||||
$article = $this->journal_paper_art_obj->where('journal_paper_art_id', $data['journal_paper_art_id'])->find();
|
||||
|
||||
$re['article'] = $article;
|
||||
return jsonSuccess($re);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user