feat : coupon
This commit is contained in:
@@ -72,4 +72,17 @@ class CouponDispenseUser extends Model
|
||||
'is_receive' => CouponCode::DISPENSE_STATUS_IS_RECEIVED
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $userIds
|
||||
* @return array
|
||||
*/
|
||||
public function getNoReceiveCountByUserIds(array $userIds): array
|
||||
{
|
||||
return $this
|
||||
->whereIn('user_id', $userIds)
|
||||
->where('receive_count',CouponCode::DISPENSE_STATUS_IS_NO_RECEIVED)
|
||||
->pluck('coupon_dispense_id')
|
||||
->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user