1
This commit is contained in:
77
application/master/controller/Submision.php
Normal file
77
application/master/controller/Submision.php
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\master\controller;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use think\Controller;
|
||||||
|
use think\Db;
|
||||||
|
use think\Queue;
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title 文章接口
|
||||||
|
* @description 文章相关操作
|
||||||
|
* @group 文章相关
|
||||||
|
*/
|
||||||
|
class Submision extends Controller {
|
||||||
|
|
||||||
|
//put your code here
|
||||||
|
protected $admin_obj = '';
|
||||||
|
protected $journal_obj = '';
|
||||||
|
protected $article_obj = '';
|
||||||
|
protected $article_author_obj = '';
|
||||||
|
protected $article_organ_obj = '';
|
||||||
|
protected $article_ltai_obj = '';
|
||||||
|
protected $article_cite_obj = '';
|
||||||
|
protected $author_to_organ_obj = '';
|
||||||
|
protected $article_to_topic_obj = '';
|
||||||
|
protected $journal_topic_obj = '';
|
||||||
|
protected $journal_stage_obj = '';
|
||||||
|
protected $journal_special_obj = '';
|
||||||
|
protected $country_obj = '';
|
||||||
|
protected $subscribe_journal_obj = '';
|
||||||
|
protected $subscribe_topic_obj = '';
|
||||||
|
protected $base_topic_obj = '';
|
||||||
|
protected $subscribe_base_topic_obj = '';
|
||||||
|
protected $medicament_obj = '';
|
||||||
|
protected $article_to_medicament_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->article_author_obj = Db::name('article_author');
|
||||||
|
$this->article_organ_obj = Db::name('article_organ');
|
||||||
|
$this->article_ltai_obj = Db::name('article_ltai');
|
||||||
|
$this->article_cite_obj = Db::name('article_cite');
|
||||||
|
$this->author_to_organ_obj = Db::name('article_author_to_organ');
|
||||||
|
$this->article_to_topic_obj = Db::name('article_to_topic');
|
||||||
|
$this->journal_topic_obj = Db::name('journal_topic');
|
||||||
|
$this->journal_stage_obj = Db::name('journal_stage');
|
||||||
|
$this->journal_special_obj = Db::name('journal_special');
|
||||||
|
$this->country_obj = Db::name('country');
|
||||||
|
$this->subscribe_journal_obj = Db::name('subscribe_journal');
|
||||||
|
$this->subscribe_topic_obj = Db::name('subscribe_topic');
|
||||||
|
$this->base_topic_obj = Db::name('base_topic');
|
||||||
|
$this->subscribe_base_topic_obj = Db::name('subscribe_base_topic');
|
||||||
|
$this->medicament_obj = Db::name('medicament');
|
||||||
|
$this->article_to_medicament_obj = Db::name('ArticleToMedicament');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getJournalStages(){
|
||||||
|
$data = $this->request->post();
|
||||||
|
$rule = new Validate([
|
||||||
|
'issn'=>'require'
|
||||||
|
]);
|
||||||
|
if(!$rule->check($data)){
|
||||||
|
return jsonError($rule->getError());
|
||||||
|
}
|
||||||
|
$journal_info = $this->journal_obj->where('issn',$data['issn'])->find();
|
||||||
|
$list = $this->journal_stage_obj->where('journal_id',$journal_info['journal_id'])->where('state',0)->select();
|
||||||
|
$re['stages'] = $list;
|
||||||
|
return jsonSuccess($re);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user