This commit is contained in:
wangjinlei
2020-11-30 10:54:48 +08:00
parent 446bc20fff
commit b29fdaf5b4
4 changed files with 68 additions and 1 deletions

View File

@@ -0,0 +1,60 @@
<?php
namespace app\api\controller;
use think\Controller;
use think\Db;
/**
* @title 期刊web接口
* @description 期刊web相关操作
* @group 期刊web相关
*/
class Journal extends Controller {
//put your code here
protected $admin_obj = '';
protected $journal_obj = '';
protected $article_obj = '';
protected $journal_topic_obj = '';
protected $journal_stage_obj = '';
protected $journal_abs_obj = '';
protected $article_to_topic_obj = '';
public function __construct(\think\Request $request = null) {
parent::__construct($request);
$this->admin_obj = Db::name('admin');
$this->journal_obj = Db::name('journal');
$this->article_obj = Db::name('article');
$this->journal_topic_obj = Db::name('journal_topic');
$this->journal_stage_obj = Db::name('journal_stage');
$this->journal_abs_obj = Db::name('journal_abstracting');
$this->article_to_topic_obj = Db::name('article_to_topic');
}
/**
* @title 获取期刊列表
* @description 获取期刊列表
* @author wangjinlei
* @url /api/Journal/getJournalList
* @method POST
*
*
* @return journalList:期刊列表@
* @journalList title:标题 issn:issn editorinchief:editorinchief acceptance:acceptance finaldecision:finaldecision apc:apc
*/
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')
->where($where)
->order('j_journal.sort desc')
->select();
return json(['code'=>0,'msg'=>'success','data'=>['journalList'=>$res]]);
}
}