用户推送数据结构-userList变为数组
							parent
							
								
									899aac4cbd
								
							
						
					
					
						commit
						1979dfdb63
					
				|  | @ -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<UserDTO> users) throws Exception { | ||||
|         for (UserDTO user : users) { | ||||
|             Map<String, Object> paramDataMap = new HashMap<>(); | ||||
|             paramDataMap.put("userList", user); | ||||
|             // 发起请求
 | ||||
|             String body = this.createPostFormHttpRequest("/API-BACKEND/openapi/user/v1/syncNotify", paramDataMap); | ||||
|         } | ||||
| 
 | ||||
|         Map<String, Object> 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("=========================="); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue