HouseRight.php 846 B

12345678910111213141516171819202122232425262728293031323334353637
  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 HouseRight extends Base
  7. {
  8. // 新增
  9. public function save(){
  10. model('HouseRight')->add();
  11. HelpHander::success([],'操作成功');
  12. }
  13. // 全部列表
  14. public function all(){
  15. $ret = model('HouseRight')->all($this->orgId);
  16. HelpHander::success($ret);
  17. }
  18. // 删除
  19. public function del(){
  20. $id = input('id/d',0);
  21. model('HouseRight')->del($id);
  22. HelpHander::success([],'操作成功');
  23. }
  24. //列表
  25. public function list(){
  26. $page = input('page/d',1);
  27. $size = input('size/d',10);
  28. $title = input('title','','trim');
  29. $ret = model('HouseRight')->lists($page,$size,$title);
  30. HelpHander::success($ret);
  31. }
  32. }