From a438c5735834c26c584abfcc7221a06c1ccadcdc Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 29 五月 2019 17:28:50 +0800
Subject: [PATCH] 资金到账明细优化

---
 fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeBaseUtil.java |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeBaseUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeBaseUtil.java
index 6513ad7..e123c72 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeBaseUtil.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoKeBaseUtil.java
@@ -50,10 +50,16 @@
 		String result = TaoBaoHttpUtil.taoKeGet(params);
 		JSONObject data = JSONObject.fromObject(result);
 		if (data != null) {
-			if (data.optJSONObject("error_response") != null
-					&& data.optJSONObject("error_response").optInt("code") == 7) {
+			if (data.optJSONObject("error_response") != null && data.optJSONObject("error_response").optInt("code") == 7
+					&& "accesscontrol.limited-by-app-access-count"
+							.equalsIgnoreCase(data.optJSONObject("error_response").optString("sub_code"))) {
 				reportAppInvalid(app.getAppKey());
 				TaoKeLogHelper.error(params, result);
+				try {
+					EmergencyUtil.baoJin("monitor-error-tb-app-limit-" + params.get("app_key"),
+							"娣樺疂APPKey璇锋眰闄愬埗銆�" + params.get("app_key") + "銆�", new String[] { "18581318252" });
+				} catch (Exception e1) {
+				}
 				throw new TaoKeApiException(TaoKeApiException.CODE_APPKEY_LIMIT, "娣樺疂璇锋眰闄愬埗:" + result, params);
 			} else if (data.optJSONObject("error_response") != null) {
 				throw new TaoKeApiException(TaoKeApiException.CODE_API_ERROR, result, params);
@@ -90,8 +96,9 @@
 		String result = TaoBaoHttpUtil.taoKeGet(params);
 		JSONObject data = JSONObject.fromObject(result);
 		if (data != null) {
-			if (data.optJSONObject("error_response") != null
-					&& data.optJSONObject("error_response").optInt("code") == 7) {
+			if (data.optJSONObject("error_response") != null && data.optJSONObject("error_response").optInt("code") == 7
+					&& "accesscontrol.limited-by-app-access-count"
+							.equalsIgnoreCase(data.optJSONObject("error_response").optString("sub_code"))) {
 				reportAppInvalid(app.getAppKey());
 				throw new TaoKeApiException(TaoKeApiException.CODE_APPKEY_LIMIT, "娣樺疂璇锋眰闄愬埗:" + result, params);
 			} else if (data.optJSONObject("error_response") != null) {
@@ -122,13 +129,6 @@
 				TaoKeLogHelper.error(e.getParams(), e.getMsg());
 				if (e.getCode() == TaoKeApiException.CODE_API_ERROR) {
 					result = e.getMsg();
-				} else if (e.getCode() == TaoKeApiException.CODE_APPKEY_LIMIT) {
-					try {
-						EmergencyUtil.baoJin("monitor-error-tb-app-limit-" + params.get("app_key"),
-								"娣樺疂APPKey璇锋眰闄愬埗銆�" + params.get("app_key") + "銆�", new String[] { "18581318252" });
-					} catch (Exception e1) {
-
-					}
 				}
 			}
 		}

--
Gitblit v1.8.0