hkys 错误码修改

This commit is contained in:
tianfeng 2025-11-24 15:37:01 +08:00
parent 164f53753a
commit 9e6fe62c47
2 changed files with 4 additions and 3 deletions

View File

@ -95,8 +95,9 @@ public class GameHkysRestController {
param.setSign(cmd.getSign()); param.setSign(cmd.getSign());
HkysResponse<UpdateUserCoinResponse> updateUserCoinResponse = gameHkysService.updateUserCoin(param); HkysResponse<UpdateUserCoinResponse> updateUserCoinResponse = gameHkysService.updateUserCoin(param);
if (updateUserCoinResponse.getErrorCode() != HyksErrorEnum.SUCCESS.getErrorCode()) { if (updateUserCoinResponse.getErrorCode() != HyksErrorEnum.SUCCESS.getErrorCode()) {
new HkysResponse<JSONObject>() return new HkysResponse<JSONObject>()
.setErrorCode(updateUserCoinResponse.getErrorCode()); .setErrorCode(updateUserCoinResponse.getErrorCode() == 406 ? 10003 : updateUserCoinResponse.getErrorCode())
.setData(new JSONObject());
} }
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("coin", updateUserCoinResponse.getData().getBalance()); jsonObject.put("coin", updateUserCoinResponse.getData().getBalance());

View File

@ -130,7 +130,7 @@ public class HkysServiceImpl implements GameHkysService {
} catch (ResponseException ex) { } catch (ResponseException ex) {
if (Objects.equals(ex.getErrorCode(), WalletErrorCode.INSUFFICIENT_BALANCE.getCode())) { if (Objects.equals(ex.getErrorCode(), WalletErrorCode.INSUFFICIENT_BALANCE.getCode())) {
return new HkysResponse<UpdateUserCoinResponse>() return new HkysResponse<UpdateUserCoinResponse>()
.setErrorCode(HyksErrorEnum.INSUFFICIENT_BALANCE.getErrorCode()); .setErrorCode(4004);
} }
} catch (Exception ex) { } catch (Exception ex) {
log.error("ex:{}", Throwables.getStackTraceAsString(ex)); log.error("ex:{}", Throwables.getStackTraceAsString(ex));