// +---------------------------------------------------------------------- namespace app\common\dao\user; use app\common\dao\BaseDao; use app\common\model\BaseModel; use app\common\model\user\AwardIntegralPrice; /** * Class UserLabelDao * @package app\common\dao\user * @author xaboy * @day 2020-05-07 */ class AwardIntegralPriceDao extends BaseDao { /** * @return BaseModel * @author xaboy * @day 2020-03-30 */ protected function getModel(): string { return AwardIntegralPrice::class; } public function search($where) { // return $this->getModel()::getDB()->where($where); $query = $this->getModel()::getDB() ->when(isset($where['day']) && $where['day'] !== '',function($query) use($where){ $query->where('day',$where['day']); }); return $query; } }