This commit is contained in:
mkm 2024-01-21 20:28:41 +08:00
parent 32ebe6ce1c
commit c04d4d19d6

View File

@ -25,7 +25,15 @@ class StoreConsumptionDao extends BaseDao
*/
public function getValidList()
{
return StoreConsumption::whereIn('type', [StoreConsumption::TYPE_OWNER_CONSUMPTION, StoreConsumption::TYPE_PULL_CONSUMPTION])->where('status', StoreConsumption::STATUS_ENABLE)->field('coupon_id,start_time,end_time,title')->select();
return StoreConsumption::whereIn('type', [StoreConsumption::TYPE_OWNER_CONSUMPTION, StoreConsumption::TYPE_PULL_CONSUMPTION])->where('status', StoreConsumption::STATUS_ENABLE)
->field('coupon_id,start_time,end_time,title')->select()->each(function ($item){
if($item['title']==['无门槛实物通用红包']){
$item['title'] = '用户推荐拉新活动';
}else{
$item['title'] = '用户消费补贴活动';
}
return $item;
});
}
public function getOne($id)