订单过期问题

This commit is contained in:
wangw 2025-03-03 15:29:10 +08:00
parent b66cc9fcf9
commit f582bb3fd2
1 changed files with 5 additions and 5 deletions

View File

@ -212,11 +212,11 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
public OrderInfo checkOrderPay(CheckOrderPay param) {
OrderInfo orderInfo = getById(param.getOrderId());
if (!"after-pay".equals(orderInfo.getPayMode())) {
if (redisService.hasKey(RedisCst.classKeyExpired.EXPIRED_ORDER + param.getOrderId())) {
redisService.set(RedisCst.classKeyExpired.EXPIRED_ORDER + param.getOrderId(), "", 60 * 15);
} else {
throw new ValidateException("订单已过期,请重新下单");
}
// if (redisService.hasKey(RedisCst.classKeyExpired.EXPIRED_ORDER + param.getOrderId())) {
// redisService.set(RedisCst.classKeyExpired.EXPIRED_ORDER + param.getOrderId(), "", 60 * 15);
// } else {
// throw new ValidateException("订单已过期,请重新下单");
// }
}
ShopInfo shopInfo = shopInfoService.getById(orderInfo.getShopId());
AssertUtil.isNull(shopInfo, "生成订单失败,店铺信息不存在");