fix: 创建订单会员价计算有误修复
This commit is contained in:
@@ -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,
|
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);
|
BigDecimal finalAmount = priceDTO.getTotalAmount().multiply(BigDecimal.valueOf(payDTO.getDiscount())).setScale(2, RoundingMode.HALF_UP);
|
||||||
|
|
||||||
orderInfo.setUpdatedAt(System.currentTimeMillis());
|
orderInfo.setUpdatedAt(System.currentTimeMillis());
|
||||||
|
|||||||
Reference in New Issue
Block a user