|
|
@ -324,6 +324,7 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
if (cashRecordDone.getNewRefundFree() == null) { |
|
|
if (cashRecordDone.getNewRefundFree() == null) { |
|
|
cashRecordDone.setNewRefundFree(BigDecimal.valueOf(0)); |
|
|
cashRecordDone.setNewRefundFree(BigDecimal.valueOf(0)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int result = cashRefundMapper.update(cashRecordDone); |
|
|
int result = cashRefundMapper.update(cashRecordDone); |
|
|
CashRecordDTO cashRecordDTO = cashRefundMapper.selectById(cashRecordDone.getId()); |
|
|
CashRecordDTO cashRecordDTO = cashRefundMapper.selectById(cashRecordDone.getId()); |
|
|
if (result > 0) { |
|
|
if (result > 0) { |
|
|
@ -516,10 +517,7 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
.collect(Collectors.toList()); |
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
// 2. 本次退款总金额(取绝对值,兼容负数) |
|
|
// 2. 本次退款总金额(取绝对值,兼容负数) |
|
|
BigDecimal totalRefundAmount = BigDecimal.valueOf(userGoldRecord.getPermanentGold()).abs() |
|
|
|
|
|
.add(BigDecimal.valueOf(userGoldRecord.getTaskGold()).abs()) |
|
|
|
|
|
.add(BigDecimal.valueOf(userGoldRecord.getFreeJune()).abs()) |
|
|
|
|
|
.add(BigDecimal.valueOf(userGoldRecord.getFreeDecember()).abs()); |
|
|
|
|
|
|
|
|
BigDecimal totalRefundAmount = BigDecimal.valueOf(userGoldRecord.getPermanentGold()).abs(); |
|
|
|
|
|
|
|
|
if (totalRefundAmount.compareTo(BigDecimal.ZERO) > 0) { |
|
|
if (totalRefundAmount.compareTo(BigDecimal.ZERO) > 0) { |
|
|
BigDecimal remainingRefund = totalRefundAmount; |
|
|
BigDecimal remainingRefund = totalRefundAmount; |
|
|
|