AwardLakeDao.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\common\dao\user;
  12. use app\common\dao\BaseDao;
  13. use app\common\model\BaseModel;
  14. use app\common\model\user\AwardIntegralPrice;
  15. use app\common\model\user\AwardLake;
  16. /**
  17. * Class AwardLakeDao
  18. * @package app\common\dao\user
  19. * @author xaboy
  20. * @day 2020-05-07
  21. */
  22. class AwardLakeDao extends BaseDao
  23. {
  24. /**
  25. * @return BaseModel
  26. * @author xaboy
  27. * @day 2020-03-30
  28. */
  29. protected function getModel(): string
  30. {
  31. return AwardLake::class;
  32. }
  33. public function search($where)
  34. {
  35. // return $this->getModel()::getDB()->where($where);
  36. $query = $this->getModel()::getDB()
  37. ->when(isset($where['type']) && $where['type'] !== '',function($query) use($where){
  38. $query->where('type',$where['type']);
  39. });
  40. return $query;
  41. }
  42. }