From 0ef7a481d8a41ea2a14452be405324e1490da55b Mon Sep 17 00:00:00 2001 From: wangjinlei <751475802@qq.com> Date: Wed, 13 Apr 2022 17:39:11 +0800 Subject: [PATCH] 1 --- application/master/controller/Special.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/application/master/controller/Special.php b/application/master/controller/Special.php index 78fc801..56185af 100644 --- a/application/master/controller/Special.php +++ b/application/master/controller/Special.php @@ -4,6 +4,7 @@ namespace app\master\controller; use think\Controller; use think\Db; +use think\Validate; /** * @title 客座期刊 @@ -111,6 +112,24 @@ class Special extends Controller { $re['specials'] = $list; return jsonSuccess($re); } + + /** + * 获取期刊的专刊列表 + */ + public function getSpecialByIssn(){ + $data = $this->request->post(); + $rule = new Validate([ + 'journal_issn' => 'require' + ]); + if(!$rule->check($data)){ + return jsonError($rule->getError()); + } + $journal_info = $this->journal_obj->where('issn',$data['journal_issn'])->find(); + $list = $this->journal_special_obj->where('journal_id',$journal_info['journal_id'])->where('state',2)->select(); + + $re['specials'] = $list; + return jsonSuccess($re); + } /** * @title 客座期刊(更改状态)