From d4450dee612e391ef44081e946a3de9a4d84d321 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Wed, 18 May 2022 14:11:05 +0800 Subject: [PATCH] 1 --- app/Services/CouponService.php | 2 +- app/Services/VipService.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/CouponService.php b/app/Services/CouponService.php index 2228e19b..bfeb39e6 100644 --- a/app/Services/CouponService.php +++ b/app/Services/CouponService.php @@ -191,7 +191,7 @@ class CouponService * @param int $num * @return void */ - public function sendCoupon(User $user, Coupon $coupon, int $num) + public function sendCoupon(User $user, Coupon $coupon, int $num = 1) { // 如果优惠券数量有限制,需扣除优惠券库存 if ($coupon->limit > 0) { diff --git a/app/Services/VipService.php b/app/Services/VipService.php index d9d21b30..0bd68d09 100644 --- a/app/Services/VipService.php +++ b/app/Services/VipService.php @@ -132,7 +132,7 @@ class VipService case Vip::TIME_MONTH: $start->addMonths($num); break; - case TIME_DAY: + case Vip::TIME_DAY: $start->addDays($num); break; default: