AwardIntegralPriceDao.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. /**
  16. * Class UserLabelDao
  17. * @package app\common\dao\user
  18. * @author xaboy
  19. * @day 2020-05-07
  20. */
  21. class AwardIntegralPriceDao extends BaseDao
  22. {
  23. /**
  24. * @return BaseModel
  25. * @author xaboy
  26. * @day 2020-03-30
  27. */
  28. protected function getModel(): string
  29. {
  30. return AwardIntegralPrice::class;
  31. }
  32. public function search($where)
  33. {
  34. // return $this->getModel()::getDB()->where($where);
  35. $query = $this->getModel()::getDB()
  36. ->when(isset($where['day']) && $where['day'] !== '',function($query) use($where){
  37. $query->where('day',$where['day']);
  38. });
  39. return $query;
  40. }
  41. }