积分模块相关代码

This commit is contained in:
谭凯凯
2024-11-01 17:39:33 +08:00
committed by Tankaikai
parent f8f47a2457
commit b81cef6782

View File

@@ -241,10 +241,10 @@ public class TbPointsExchangeRecordServiceImpl extends ServiceImpl<TbPointsExcha
// 设置支付方式
entity.setPayMethod(payMethod.get(record.getPayType().toUpperCase()));
// 纯积分支付并且商品需要额外支付金额,需要抛出异常
if ("POINTS".equals(entity.getPayType()) && NumberUtil.isGreater(record.getExtraPaymentAmount(), BigDecimal.ZERO)) {
if ("POINTS".equals(entity.getPayType()) && NumberUtil.isGreater(entity.getExtraPaymentAmount(), BigDecimal.ZERO)) {
throw new MsgException("此商品需要额外支付金额");
}
if (!"POINTS".equals(entity.getPayType()) && NumberUtil.equals(record.getExtraPaymentAmount(), BigDecimal.ZERO)) {
if (!"POINTS".equals(entity.getPayType()) && NumberUtil.equals(entity.getExtraPaymentAmount(), BigDecimal.ZERO)) {
throw new MsgException("此商品不需要额外支付金额");
}
// 如果不需要额外支付