HouseBuilding.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 HouseBuilding extends Base
  7. {
  8. // 新增
  9. public function save(){
  10. model('HouseBuilding')->add();
  11. HelpHander::success([],'操作成功');
  12. }
  13. // 删除
  14. public function del(){
  15. $id = input('id/d',0);
  16. model('HouseBuilding')->del($id);
  17. HelpHander::success([],'操作成功');
  18. }
  19. //列表
  20. public function list(){
  21. $page = input('page/d',1);
  22. $size = input('size/d',10);
  23. $title = input('title','','trim');
  24. $type = input('type/d',1);
  25. $ret = model('HouseBuilding')->lists($page,$size,$title,$type,$this->orgId);
  26. HelpHander::success($ret);
  27. }
  28. public function blist(){
  29. $type = input('type/d',1);
  30. $title = input('title','','trim');
  31. $cate = input('cate/d',1);
  32. $ret = model('HouseBuilding')->blist($type,$title,$this->userId,$this->orgId,$cate);
  33. HelpHander::success($ret);
  34. }
  35. public function houseTurnList(){
  36. $buildingId = input('buildingId/d',0);
  37. $title = input('title','','trim');
  38. $cate = input('cate/d',0);
  39. $ret = model('HouseBuilding')->houseTurnList($this->userId,$this->orgId,$buildingId,$title,$cate);
  40. HelpHander::success($ret);
  41. }
  42. public function houseTurnDetails(){
  43. $id = input('id/d',0);
  44. $ret = model('HouseBuilding')->houseTurnDetails($id);
  45. HelpHander::success($ret);
  46. }
  47. public function houseFloor(){
  48. $buildingId = input('buildingId/d',0);
  49. $ret = model('HouseBuilding')->houseFloor($this->userId,$this->orgId,$buildingId);
  50. HelpHander::success($ret);
  51. }
  52. }