From 862d5ce345bbcd02865845eba32cfe871cb655af Mon Sep 17 00:00:00 2001 From: water_xu Date: Tue, 9 Jul 2024 15:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=B9=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=AE=A1=E6=89=B9=20-=20=E5=AE=8C=E5=96=84=E4=BA=8B=E5=8A=A1?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9C=BA=E5=88=B6=E4=BB=A5=E5=8F=8A=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E5=A4=B1=E8=B4=A5=E7=9A=84=E5=8F=8B=E5=A5=BD=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zcloud/flow/util/GJSendMessageUtil.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java b/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java index 648da3b3..ae575cad 100644 --- a/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java +++ b/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java @@ -59,8 +59,18 @@ public class GJSendMessageUtil { Map paramDataMap = new HashMap<>(); paramDataMap.put("userList", users); - // 发起请求 - String body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap); + String body = ""; + try { + // 发起请求 + body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap); + }catch (Exception e){ + e.printStackTrace(); + throw new RuntimeException("网络通信异常"); + } + if (!"1".equals(paramDataMap.get("code"))) { + System.out.println("工匠学院通信异常 ===> " + paramDataMap.get("message")); + throw new RuntimeException("工匠学院异常,请联系学院老师"); + } System.out.println("=========================="); System.out.println(body); System.out.println("==========================");