发放数量查询
This commit is contained in:
parent
66a4f44d6d
commit
a2a2b78f91
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue