feat : check
This commit is contained in:
@@ -52,7 +52,7 @@ class IndexService extends BaseService
|
||||
return $this->userCouponModel
|
||||
->where('user_id',$this->userId)
|
||||
->where('status',CouponCode::COUPON_STATUS_UNUSED)
|
||||
->where('validity_end_time','<',date('Y-m-d H:i:s'))
|
||||
->where('validity_end_time','>=',date('Y-m-d H:i:s'))
|
||||
->count() ?? 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ class MyPageService extends BaseService
|
||||
return $this->userCouponModel
|
||||
->where('user_id',$this->userId)
|
||||
->where('status',CouponCode::COUPON_STATUS_UNUSED)
|
||||
->where('validity_end_time','<',date('Y-m-d H:i:s'))
|
||||
->where('validity_end_time','>=',date('Y-m-d H:i:s'))
|
||||
->count() ?? 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user