diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java index 9def3612..01bfc452 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/TbPayServiceImpl.java @@ -134,7 +134,8 @@ public class TbPayServiceImpl implements TbPayService { body.append(cashierCart.getName()); } - BigDecimal payMount = orderInfo.getOrderAmount().multiply(BigDecimal.valueOf(scanPayDTO.getDiscount()).setScale(2, RoundingMode.HALF_UP)); + BigDecimal payMount = orderInfo.getOrderAmount().multiply(BigDecimal.valueOf(scanPayDTO.getDiscount())).setScale(2, RoundingMode.HALF_UP); + TbMerchantThirdApply thirdApply = merchantThirdApplyRepository.getById(Integer.valueOf(orderInfo.getMerchantId())); if (ObjectUtil.isEmpty(thirdApply) || ObjectUtil.isNull(thirdApply)) { @@ -412,7 +413,7 @@ public class TbPayServiceImpl implements TbPayService { // return Result.fail(CodeEnum.PAYTYPENOEXIST); // } - BigDecimal payMount = orderInfo.getOrderAmount().multiply(BigDecimal.valueOf(payDTO.getDiscount()).setScale(2, RoundingMode.HALF_UP)); + BigDecimal payMount = orderInfo.getOrderAmount().multiply(BigDecimal.valueOf(payDTO.getDiscount())).setScale(2, RoundingMode.HALF_UP); orderInfo.setPayAmount(payMount); orderInfo.setPayType("cash"); orderInfo.setStatus("closed"); @@ -448,7 +449,7 @@ public class TbPayServiceImpl implements TbPayService { throw new BadRequestException("此订单不处于未支付状态"); } - BigDecimal payMount = orderInfo.getOrderAmount().multiply(BigDecimal.valueOf(discount).setScale(2, RoundingMode.HALF_UP)); + BigDecimal payMount = orderInfo.getOrderAmount().multiply(BigDecimal.valueOf(discount)).setScale(2, RoundingMode.HALF_UP); long count = tbShopPayTypeMapper.selectCount(new LambdaQueryWrapper() .eq(TbShopPayType::getShopId, shopId)