|
|
|
@ -476,6 +476,13 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
user.setCurrentPermanentGold(BigDecimal.valueOf(-userGoldRecord.getPermanentGold())); //当前永久金币 |
|
|
|
user.setCurrentFreeJune(BigDecimal.valueOf(-userGoldRecord.getFreeJune())); //当前六月免费金币 |
|
|
|
user.setCurrentFreeDecember(BigDecimal.valueOf(-userGoldRecord.getFreeDecember())); //当前十二月免费金币 |
|
|
|
User usergold = userMapper.selectUserByJwcode(userGoldRecord.getJwcode()); |
|
|
|
if(usergold.getCurrentFreeJune().add(user.getCurrentFreeJune()).compareTo(BigDecimal.ZERO)<0){ |
|
|
|
throw new RuntimeException("当前六月免费金币不足"); |
|
|
|
} |
|
|
|
if (usergold.getCurrentFreeDecember().add(user.getCurrentFreeDecember()).compareTo(BigDecimal.ZERO)<0){ |
|
|
|
throw new RuntimeException("当前十二月免费金币不足"); |
|
|
|
} |
|
|
|
auditMapper.updateUserGold(user); |
|
|
|
|
|
|
|
// 钱包更新 - 按原始充值流水 wallet_id 优先级顺序原路退回(1-10,越小优先级越高) |
|
|
|
|