会员余额支付缺陷修复

This commit is contained in:
谭凯凯
2024-10-29 15:47:09 +08:00
committed by Tankaikai
parent 17cbff4228
commit d5b0813c46

View File

@@ -661,7 +661,6 @@ public class TbShopTableServiceImpl implements TbShopTableService {
} }
if (cashierCart.getOrderId() == null) { if (cashierCart.getOrderId() == null) {
throw new BadRequestException("此商品还未下单,无需退单"); throw new BadRequestException("此商品还未下单,无需退单");
} }
@@ -1381,7 +1380,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
} }
if (shopEatTypeInfoDTO.isIncrMaterId() && "pending".equals(orderInfo.getStatus())) { if (shopEatTypeInfoDTO.isIncrMaterId() && "pending".equals(orderInfo.getStatus())) {
String key = RedisConstant.getMasterIdKey(createOrderDTO.getShopId(), cn.ysk.cashier.utils.DateUtils.getDay(), orderInfo.getTableId());; String key = RedisConstant.getMasterIdKey(createOrderDTO.getShopId(), cn.ysk.cashier.utils.DateUtils.getDay(), orderInfo.getTableId());
;
redisTemplate.delete(key); redisTemplate.delete(key);
} }
} }
@@ -1636,7 +1636,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
orderInfo.setDiscountRatio(BigDecimal.valueOf(payDTO.getDiscount())); orderInfo.setDiscountRatio(BigDecimal.valueOf(payDTO.getDiscount()));
orderInfo.setDiscountAmount(orderInfo.getAmount().subtract(finalAmount)); orderInfo.setDiscountAmount(orderInfo.getAmount().subtract(finalAmount));
} }
if (StrUtil.isEmpty(orderInfo.getMemberId())) {
orderInfo.setMemberId(Convert.toStr(payDTO.getVipUserId())); orderInfo.setMemberId(Convert.toStr(payDTO.getVipUserId()));
}
orderInfoMapper.updateById(orderInfo); orderInfoMapper.updateById(orderInfo);
//更新购物车状态 //更新购物车状态