|
|
|
@ -207,7 +207,7 @@ public class ConsumeServiceImpl implements ConsumeService { |
|
|
|
|
|
|
|
if(consumeUser.getPermanentGold().compareTo(BigDecimal.ZERO)!=0) { |
|
|
|
// 需要扣除的永久金币总量 |
|
|
|
BigDecimal remainingPermanentGold = consumeUser.getPermanentGold().divide(BigDecimal.valueOf(100)); |
|
|
|
BigDecimal remainingPermanentGold = consumeUser.getPermanentGold(); |
|
|
|
|
|
|
|
// 遍历钱包列表,依次扣款 |
|
|
|
for(RegionWalletDTO wallet : regionWallets) { |
|
|
|
@ -252,7 +252,7 @@ public class ConsumeServiceImpl implements ConsumeService { |
|
|
|
// 检查是否所有需要扣除的金额都已扣除 |
|
|
|
if(remainingPermanentGold.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
// 如果还有剩余金额未扣除,说明所有钱包余额不足 |
|
|
|
String errorMsg = "所有钱包永久金币余额不足,剩余需要扣除:" + remainingPermanentGold; |
|
|
|
String errorMsg = "所有钱包永久金币余额不足,剩余需要扣除:" + remainingPermanentGold.divide(BigDecimal.valueOf(100)); |
|
|
|
log.error(errorMsg); |
|
|
|
throw new SystemException(errorMsg); |
|
|
|
} |
|
|
|
|