使用绑定满减活动的优惠券无法正常使用问题处理
This commit is contained in:
parent
a9f0eac6f7
commit
a08373d6a8
@ -281,7 +281,7 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> impleme
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void usedCoupon(String couponId, Integer usedNum) {
|
public void usedCoupon(String couponId, Integer usedNum) {
|
||||||
CouponVO couponVO = checkStatus(couponId);
|
CouponVO couponVO = this.mongoTemplate.findById(couponId, CouponVO.class);
|
||||||
couponVO.setUsedNum(couponVO.getUsedNum() + usedNum);
|
couponVO.setUsedNum(couponVO.getUsedNum() + usedNum);
|
||||||
LambdaUpdateWrapper<Coupon> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<Coupon> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.eq(Coupon::getId, couponId);
|
updateWrapper.eq(Coupon::getId, couponId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user