12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- class Org extends Base
- {
- // 新增
- public function save(){
- model('Org')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('Org')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function selById(){
- $id = input('id/d',0);
- $ret = model('Org')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('Org')->lists($page,$size);
- HelpHander::success($ret);
- }
- // 作废组织
- public function disableOrg(){
- $orgId = input('orgId/d',0);
- model('Org')->disableOrg($orgId);
- HelpHander::success([],'操作成功');
- }
- // 启用组织
- public function toEnableOrg(){
- $orgId = input('orgId/d',0);
- model('Org')->toEnableOrg($orgId);
- HelpHander::success([],'操作成功');
- }
- // 显示直属下级机构列表
- public function selByOrgId(){
- $id = input('id/d',0);
- $ret = model('Org')->selByOrgId($id);
- HelpHander::success($ret);
- }
- }
|