金额为0继续处理
This commit is contained in:
parent
fb54999074
commit
6d4d3308b8
@ -152,15 +152,24 @@ public class YomiGameServiceImpl implements YomiGameService {
|
|||||||
return new YomiBalanceCO(balanceResp.getBody().getDollarAmount().longValue());
|
return new YomiBalanceCO(balanceResp.getBody().getDollarAmount().longValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
WalletReceiptResDTO res = walletGoldClient.changeBalance(
|
long currentBalance;
|
||||||
gameEventService.buildReceipt(cmd.getPlatToken(), userId, cmd.getReasonType(),
|
if (cmd.getGold() == 0) {
|
||||||
GoldOrigin.YOMI_GAME, gameIdStr,
|
ResultResponse<PennyAmount> balanceResp = walletGoldClient.getBalance(userId);
|
||||||
String.valueOf(cmd.getGameRoundId()), cmd.getGold())
|
if (balanceResp == null || balanceResp.getBody() == null) {
|
||||||
).getBody();
|
throw new Exception("wallet getBalance failed, response is null");
|
||||||
if (res == null || res.getBalance() == null) {
|
}
|
||||||
throw new Exception("wallet changeBalance failed, response is null");
|
currentBalance = balanceResp.getBody().getDollarAmount().longValue();
|
||||||
|
} else {
|
||||||
|
WalletReceiptResDTO res = walletGoldClient.changeBalance(
|
||||||
|
gameEventService.buildReceipt(cmd.getPlatToken(), userId, cmd.getReasonType(),
|
||||||
|
GoldOrigin.YOMI_GAME, gameIdStr,
|
||||||
|
String.valueOf(cmd.getGameRoundId()), cmd.getGold())
|
||||||
|
).getBody();
|
||||||
|
if (res == null || res.getBalance() == null) {
|
||||||
|
throw new Exception("wallet changeBalance failed, response is null");
|
||||||
|
}
|
||||||
|
currentBalance = res.getBalance().getDollarAmount().longValue();
|
||||||
}
|
}
|
||||||
long currentBalance = res.getBalance().getDollarAmount().longValue();
|
|
||||||
|
|
||||||
gameEventService.markProcessed(idempotentKey, IDEMPOTENT_EXPIRE_SECONDS);
|
gameEventService.markProcessed(idempotentKey, IDEMPOTENT_EXPIRE_SECONDS);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user