From 9c919021666383f95e958f8361b25883527e1c41 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Tue, 1 Apr 2025 17:12:50 +0800 Subject: [PATCH] feat : check --- app/Service/Api/User/IndexService.php | 2 +- app/Service/Api/User/MyPageService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Service/Api/User/IndexService.php b/app/Service/Api/User/IndexService.php index 214b5b6..36b3319 100644 --- a/app/Service/Api/User/IndexService.php +++ b/app/Service/Api/User/IndexService.php @@ -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; } diff --git a/app/Service/Api/User/MyPageService.php b/app/Service/Api/User/MyPageService.php index 0926b0a..1e24060 100644 --- a/app/Service/Api/User/MyPageService.php +++ b/app/Service/Api/User/MyPageService.php @@ -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; }