feat : coupon
This commit is contained in:
@@ -82,25 +82,22 @@ class CouponDispenseLog extends Model
|
||||
*/
|
||||
public function getNoReceiveCount(): array
|
||||
{
|
||||
$all = $this
|
||||
return $this
|
||||
->where('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS)
|
||||
->whereColumn('total_count','!=','receive_count')
|
||||
->where('appoint_group',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE)
|
||||
->where('status',CouponCode::DISPENSE_VALIDITY)
|
||||
->pluck('id')
|
||||
->toArray();
|
||||
}
|
||||
|
||||
$appoint = $this
|
||||
->where('claim_rule',CouponCode::DISPENSE_CLAIM_RULE_HOME_POPUPS)
|
||||
->where('appoint_group','!=',CouponCode::DISPENSE_APPOINT_GROUP_ALL_PEOPLE)
|
||||
->where('status',CouponCode::DISPENSE_VALIDITY)
|
||||
->pluck('id')
|
||||
->toArray();
|
||||
|
||||
return [
|
||||
'all' => $all,
|
||||
'appoint' => $appoint
|
||||
];
|
||||
/**
|
||||
* @param array $ids
|
||||
* @return Collection
|
||||
*/
|
||||
public function getInfoByIds(array $ids)
|
||||
{
|
||||
return $this->whereIn('id',$ids)->get();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user