diff --git a/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java b/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java index 17f0a739..648da3b3 100644 --- a/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java +++ b/src/main/java/com/zcloud/flow/util/GJSendMessageUtil.java @@ -4,6 +4,7 @@ import cn.hutool.core.util.RandomUtil; import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.zcloud.flow.util.dto.UserDTO; import lombok.extern.apachecommons.CommonsLog; import lombok.extern.slf4j.Slf4j; @@ -55,12 +56,17 @@ public class GJSendMessageUtil { public static final String TIMESTAMP_HEADER = "gjxy-timestamp"; public void sendMessage(List users) throws Exception { - for (UserDTO user : users) { - Map paramDataMap = new HashMap<>(); - paramDataMap.put("userList", user); - // 发起请求 - String body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap); - } + + Map paramDataMap = new HashMap<>(); + paramDataMap.put("userList", users); + // 发起请求 + String body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap); + System.out.println("=========================="); + System.out.println(body); + System.out.println("=========================="); + System.out.println(JSONObject.toJSONString(paramDataMap)); + System.out.println("=========================="); + } /**