refactor(ff-admin): 优化余额计算逻辑
- 在获取余额时使用 NumberUtil.add 方法,确保结果不会为 null - 避免潜在的 NullPointerException,提高代码健壮性main-p
parent
6785ac862f
commit
1e495270a9
|
@ -323,12 +323,12 @@ public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService {
|
|||
.tenantKey(gameBalanceExchange.getTenantKey())
|
||||
.memberId(member.getId())
|
||||
.build());
|
||||
BigDecimal balanceOut = tenantGameQuotaFlowService.getExchangeMoneyByMemberId(TenantGameQuotaFlow.builder()
|
||||
BigDecimal balanceOut = NumberUtil.add(tenantGameQuotaFlowService.getExchangeMoneyByMemberId(TenantGameQuotaFlow.builder()
|
||||
.isOut(Boolean.FALSE)
|
||||
.quotaType(quotaType)
|
||||
.tenantKey(gameBalanceExchange.getTenantKey())
|
||||
.memberId(member.getId())
|
||||
.build());
|
||||
.build()),BigDecimal.ZERO);
|
||||
|
||||
// 初始化平台额度
|
||||
BigDecimal platformBalance = BigDecimal.ZERO;
|
||||
|
|
Loading…
Reference in New Issue