release
parent
296eea470e
commit
d4450dee61
|
|
@ -191,7 +191,7 @@ class CouponService
|
||||||
* @param int $num
|
* @param int $num
|
||||||
* @return void
|
* @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) {
|
if ($coupon->limit > 0) {
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ class VipService
|
||||||
case Vip::TIME_MONTH:
|
case Vip::TIME_MONTH:
|
||||||
$start->addMonths($num);
|
$start->addMonths($num);
|
||||||
break;
|
break;
|
||||||
case TIME_DAY:
|
case Vip::TIME_DAY:
|
||||||
$start->addDays($num);
|
$start->addDays($num);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue