发放数量查询
This commit is contained in:
@@ -125,12 +125,16 @@ public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCou
|
|||||||
}
|
}
|
||||||
if (isNotNewUser && coupon.getGetLimit() != -10086) {
|
if (isNotNewUser && coupon.getGetLimit() != -10086) {
|
||||||
if (coupon.getSyncId() != null) {
|
if (coupon.getSyncId() != null) {
|
||||||
long count = recordService.count(new QueryWrapper().eq(MkShopCouponRecord::getCouponSyncId, coupon.getSyncId()));
|
long count = recordService.count(new QueryWrapper()
|
||||||
|
.eq(MkShopCouponRecord::getUserId, userId)
|
||||||
|
.eq(MkShopCouponRecord::getCouponSyncId, coupon.getSyncId()));
|
||||||
if (count >= coupon.getGetLimit()) {
|
if (count >= coupon.getGetLimit()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
long count = recordService.count(new QueryWrapper().eq(MkShopCouponRecord::getCouponId, coupon.getId()));
|
long count = recordService.count(new QueryWrapper()
|
||||||
|
.eq(MkShopCouponRecord::getUserId, userId)
|
||||||
|
.eq(MkShopCouponRecord::getCouponId, coupon.getId()));
|
||||||
if (count >= coupon.getGetLimit()) {
|
if (count >= coupon.getGetLimit()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user