fix: 创建订单会员价计算有误修复

This commit is contained in:
张松 2024-11-06 15:36:57 +08:00
parent 8d5642c07a
commit 090e5d320e
1 changed files with 2 additions and 2 deletions

View File

@ -1151,7 +1151,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
// }
// 创建订单详情
OrderPriceDTO detailPriceDTO = createOrderDetailWithCoupon(cartInfoDTO.getCashierCarts(), cartInfoDTO.getOrderId(), createOrderDTO.getShopId(), true);
OrderPriceDTO detailPriceDTO = createOrderDetailWithCoupon(cartInfoDTO.getCashierCarts(), orderInfo, createOrderDTO.getShopId(), true);
// 是否是第一次创建订单
orderInfo = createOrderWithAction(createOrderDTO, detailPriceDTO, shopEatTypeInfoDTO,
@ -1954,7 +1954,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
// 更新订单信息
OrderPriceDTO priceDTO = createOrderDetailWithCoupon(activateCartInfo, orderInfo.getId(), payDTO.getShopId(), false);
OrderPriceDTO priceDTO = createOrderDetailWithCoupon(activateCartInfo, orderInfo, payDTO.getShopId(), false);
BigDecimal finalAmount = priceDTO.getTotalAmount().multiply(BigDecimal.valueOf(payDTO.getDiscount())).setScale(2, RoundingMode.HALF_UP);
orderInfo.setUpdatedAt(System.currentTimeMillis());