CleaningType.php 731 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\model;
  3. use think\Db;
  4. use think\Exception;
  5. class CleaningType extends Base
  6. {
  7. protected $createTime = 'create_time';
  8. protected $updateTime = 'update_time';
  9. protected $table = 'cleaning_type';
  10. protected $validateName = 'CleaningType';
  11. public function updates($orgId)
  12. {
  13. $data = request()->post();
  14. $data['org_id'] = $orgId;
  15. return $this->updateInfo($data, $this->validateName, '');
  16. }
  17. public function getList($orgId){
  18. $map[] = ['org_id','=',$orgId];
  19. $map[] = ['del','=',0];
  20. $map[] = ['enable','=',1];
  21. $lists = Db::name($this->table)
  22. ->where($map)
  23. ->select();
  24. return $lists;
  25. }
  26. }