feat : coupon
This commit is contained in:
@@ -48,7 +48,7 @@ class ReceiveService extends BaseService
|
||||
|
||||
$userBag = $this->userCouponModel->getReceiveCountByUserIds($this->userId, $idArr);
|
||||
|
||||
if (count(array_diff(array_column($couponArr, 'id'), $userBag)) != $couponArr) throw new ErrException('优惠券已领完');
|
||||
if (count(array_diff(array_column($couponArr, 'id'), $userBag)) != count($couponArr)) throw new ErrException('优惠券已领完');
|
||||
|
||||
$this->receive($couponArr);
|
||||
|
||||
@@ -112,7 +112,7 @@ class ReceiveService extends BaseService
|
||||
];
|
||||
}
|
||||
|
||||
if (empty($allUpdateData)) return;
|
||||
if (empty($this->allUpdateData) || empty($this->insertData)) return;
|
||||
|
||||
$this->matters();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user