added 完成接口和接口组的关联操作

This commit is contained in:
zhaoxiang 2018-02-22 23:52:24 +08:00
parent a5251bbabd
commit 5ebb79720e
2 changed files with 19 additions and 0 deletions

View File

@ -52,6 +52,21 @@ class InterfaceGroup extends Base {
]);
}
/**
* 获取全部有效的接口组
* @author zhaoxiang <zhaoxiang051405@gmail.com>
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getAll() {
$listInfo = (new ApiGroup())->where(['status' => 1])->select();
return $this->buildSuccess([
'list' => $listInfo
]);
}
/**
* 接口组状态编辑
* @return array

View File

@ -179,6 +179,10 @@ return [
'admin/InterfaceGroup/del',
['method' => 'get', 'after_behavior' => $afterBehavior]
],
'InterfaceGroup/getAll' => [
'admin/InterfaceGroup/getAll',
['method' => 'get', 'after_behavior' => $afterBehavior]
],
'InterfaceGroup/changeStatus' => [
'admin/InterfaceGroup/changeStatus',
['method' => 'get', 'after_behavior' => $afterBehavior]