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("==========================");