From 0874ababb94bfb41a3bf7826572a60b84e0fd943 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 22 四月 2022 18:26:38 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 6c3b9f9..58d6f25 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -291,7 +291,7 @@
}
String response;
try {
- response = new HttpHandler.Builder()
+ response = new HttpHandler.Builder()
.setUri(MesConstant.URL)
.setPath(MesConstant.PACK_DOWN_URL)
.setJson(JSON.toJSONString(mesCombParam))
@@ -300,15 +300,16 @@
JSONObject jsonObject = JSON.parseObject(response);
if (jsonObject.getInteger("code").equals(200)) {
log.info("璇锋眰鎺ュ彛鎴愬姛锛侊紒锛�");
-// log.info("璇锋眰鎺ュ彛鎴愬姛锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
+ } else if (jsonObject.getInteger("code").equals(500)) {
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
+ throw new CoolException(jsonObject.getString("msg"));
} else {
log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response);
throw new CoolException("涓婃姤mes绯荤粺澶辫触");
}
} catch (Exception e) {
log.error("fail", e);
- e.printStackTrace();
- throw new CoolException("涓婃姤mes绯荤粺澶辫触");
+ throw new CoolException(e.getMessage());
}
}
--
Gitblit v1.9.1