|
@@ -201,7 +201,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
key = "T(String).valueOf(#createUserOrderDTO.userId)" +
|
|
|
".concat('-').concat(#createUserOrderDTO.productId)" +
|
|
|
".concat('-').concat(#createUserOrderDTO.paymentMethod)" +
|
|
|
- ".concat('-').concat(#createUserOrderDTO.num)",
|
|
|
+ ".concat('-').concat(#createUserOrderDTO.num)" +
|
|
|
+ ".concat('-').concat(#createUserOrderDTO.discountFlag)",
|
|
|
cacheManager = "myRedisCacheManager", unless = "#result == null")
|
|
|
public Map<String, String> createUserOrder(CreateUserOrderDTO createUserOrderDTO) {
|
|
|
UserVO userVO = userApi.getById(createUserOrderDTO.getUserId()).getResult();
|
|
@@ -341,7 +342,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
key = "T(String).valueOf(#createUserOrderDTO.userId)" +
|
|
|
".concat('-').concat(#createUserOrderDTO.productId)" +
|
|
|
".concat('-').concat(#createUserOrderDTO.paymentMethod)" +
|
|
|
- ".concat('-').concat(#createUserOrderDTO.num)",
|
|
|
+ ".concat('-').concat(#createUserOrderDTO.num)" +
|
|
|
+ ".concat('-').concat(#createUserOrderDTO.discountFlag)",
|
|
|
cacheManager = "myRedisCacheManager", unless = "#result == null")
|
|
|
public Map<String, String> createUserSubscription(CreateUserOrderDTO createUserOrderDTO) {
|
|
|
UserVO userVO = userApi.getById(createUserOrderDTO.getUserId()).getResult();
|
|
@@ -546,7 +548,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
//删除缓存中的订单
|
|
|
deleteTheCacheInTheCacheManager(orders.getEmail() + "-" + orders.getProductId() + "-" + orders.getPayment());
|
|
|
// 会员订单,通过userId
|
|
|
- deleteTheCacheInTheCacheManager(orders.getUserId() + "-" + orders.getProductId() + "-" + orders.getPayment() + "-" + orders.getPayNumber());
|
|
|
+ deleteTheCacheInTheCacheManager(orders.getUserId() + "-" + orders.getProductId() + "-" + orders.getPayment() + "-" + orders.getPayNumber() + "-" + orders.getDiscountType());
|
|
|
// 检查订单优惠券
|
|
|
productApi.refundCouponByOrderId(orderId);
|
|
|
}
|
|
@@ -567,7 +569,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
this.baseMapper.updateById(order);
|
|
|
}
|
|
|
//删除缓存中的订单
|
|
|
- deleteTheCacheInTheCacheManager(orders.getUserId() + "-" + orders.getProductId() + "-" + orders.getPayment() + "-" + orders.getPayNumber());
|
|
|
+ deleteTheCacheInTheCacheManager(orders.getUserId() + "-" + orders.getProductId() + "-" + orders.getPayment() + "-" + orders.getPayNumber() + "-" + orders.getDiscountType());
|
|
|
// 检查订单优惠券
|
|
|
productApi.refundCouponByOrderId(orders.getId());
|
|
|
}
|