1.代客下单 折扣差1修复
This commit is contained in:
@@ -134,7 +134,8 @@ public class TbPayServiceImpl implements TbPayService {
|
|||||||
body.append(cashierCart.getName());
|
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()));
|
TbMerchantThirdApply thirdApply = merchantThirdApplyRepository.getById(Integer.valueOf(orderInfo.getMerchantId()));
|
||||||
if (ObjectUtil.isEmpty(thirdApply) || ObjectUtil.isNull(thirdApply)) {
|
if (ObjectUtil.isEmpty(thirdApply) || ObjectUtil.isNull(thirdApply)) {
|
||||||
@@ -412,7 +413,7 @@ public class TbPayServiceImpl implements TbPayService {
|
|||||||
// return Result.fail(CodeEnum.PAYTYPENOEXIST);
|
// 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.setPayAmount(payMount);
|
||||||
orderInfo.setPayType("cash");
|
orderInfo.setPayType("cash");
|
||||||
orderInfo.setStatus("closed");
|
orderInfo.setStatus("closed");
|
||||||
@@ -448,7 +449,7 @@ public class TbPayServiceImpl implements TbPayService {
|
|||||||
throw new BadRequestException("此订单不处于未支付状态");
|
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<TbShopPayType>()
|
long count = tbShopPayTypeMapper.selectCount(new LambdaQueryWrapper<TbShopPayType>()
|
||||||
.eq(TbShopPayType::getShopId, shopId)
|
.eq(TbShopPayType::getShopId, shopId)
|
||||||
|
|||||||
Reference in New Issue
Block a user