Subsidiary.php 592 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\Db;
  6. class Subsidiary extends Base
  7. {
  8. // 新增/编辑
  9. public function save(){
  10. model('Subsidiary')->add();
  11. HelpHander::success([],'操作成功');
  12. }
  13. // 删除
  14. public function del(){
  15. $id = input('id/d',0);
  16. model('Subsidiary')->del($id);
  17. HelpHander::success([],'操作成功');
  18. }
  19. //列表
  20. public function list(){
  21. $ret = model('Subsidiary')->lists($this->orgId);
  22. HelpHander::success($ret);
  23. }
  24. }