From b6853bf0a1411e39360f184b3bee5836010dbd22 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 27 十月 2020 17:35:18 +0800 Subject: [PATCH] CMQ接口优化 --- utils/src/main/java/com/qcloud/cmq/Account.java | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/src/main/java/com/qcloud/cmq/Account.java b/utils/src/main/java/com/qcloud/cmq/Account.java index e5731fc..36423db 100644 --- a/utils/src/main/java/com/qcloud/cmq/Account.java +++ b/utils/src/main/java/com/qcloud/cmq/Account.java @@ -80,7 +80,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); } /** @@ -101,7 +101,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); } /** @@ -129,7 +129,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); int totalCount = jsonObj.getInt("totalCount"); JSONArray jsonArray = jsonObj.getJSONArray("queueList"); @@ -192,7 +192,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); } @@ -214,7 +214,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); } @@ -242,7 +242,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); int totalCount = jsonObj.getInt("totalCount"); @@ -337,7 +337,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),code+""); } @@ -365,7 +365,7 @@ JSONObject jsonObj = new JSONObject(result); int code = jsonObj.getInt("code"); if(code != 0) - throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("requestId")); + throw new CMQServerException(code,jsonObj.getString("message"),jsonObj.getString("code")); } -- Gitblit v1.8.0