hkys 错误码修改
This commit is contained in:
parent
164f53753a
commit
9e6fe62c47
@ -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());
|
||||||
|
|||||||
@ -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));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user