相关方人员审批 - 完善事务处理机制以及推送失败的友好提示

xuyifeng-0724-人员中台对接-dev
water_xu 2024-07-09 15:43:49 +08:00
parent a310e9d409
commit 862d5ce345
1 changed files with 12 additions and 2 deletions

View File

@ -59,8 +59,18 @@ public class GJSendMessageUtil {
Map<String, Object> 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("==========================");