|
@@ -2581,8 +2581,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//12月买的 退200余额
|
|
//12月买的 退200余额
|
|
|
refundBalance = refundBalance.add(BigDecimal.valueOf(20000));
|
|
refundBalance = refundBalance.add(BigDecimal.valueOf(20000));
|
|
|
}
|
|
}
|
|
|
- //超过订单金额 计算剩余的余额
|
|
|
|
|
- if (refundMoney.add(refundBalance).compareTo(orderTotalMoney) > 0) {
|
|
|
|
|
|
|
+ //超过订单金额 计算剩余的余额 排除兑换码
|
|
|
|
|
+ if (orderTotalMoney.compareTo(BigDecimal.ZERO) > 0 && refundMoney.add(refundBalance).compareTo(orderTotalMoney) > 0) {
|
|
|
refundBalance = orderTotalMoney.subtract(refundMoney);
|
|
refundBalance = orderTotalMoney.subtract(refundMoney);
|
|
|
}
|
|
}
|
|
|
orderRefundDto.setRefundMoney(refundMoney);
|
|
orderRefundDto.setRefundMoney(refundMoney);
|