|
|
@@ -1,8 +1,9 @@
|
|
|
-package com.kede.wechat.service.impl;
|
|
|
+package com.kede.wechat.service.impl;
|
|
|
|
|
|
import com.kede.common.utils.DateUtils;
|
|
|
import com.kede.common.utils.HttpUtils;
|
|
|
import com.kede.common.utils.RSAEncrypt;
|
|
|
+import com.kede.wechat.bo.ChatMsg;
|
|
|
import com.kede.wechat.service.ConversationContentService;
|
|
|
import com.tencent.wework.Finance;
|
|
|
import org.json.JSONArray;
|
|
|
@@ -165,9 +166,22 @@ public class ConversationContentServiceImpl implements ConversationContentServic
|
|
|
System.out.println(result.getString("errcode"));
|
|
|
System.out.println("获取会话内容存档成员列表失败");
|
|
|
}
|
|
|
+ pushMsg(result.toJSONString());
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ public void pushMsg(String msg){
|
|
|
+ msg="{\"msgid\":\"1634016854685227651_1749628622146_external\",\"action\":\"send\"," +
|
|
|
+ "\"from\":\"wopeIoCwAArS1POCA5Fiw6VidWWqkwVA\",\"tolist\":[\"KaKa\"],\"roomid\":\"\",\"msgtime\":1749628618742,\"msgtype\":\"text\",\"" +
|
|
|
+ "text\":{\"content\":\"您好,请详细描述您的问题,以便更快得到解答!\"}}";
|
|
|
+ com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(msg);
|
|
|
+ //直接转成对象
|
|
|
+ ChatMsg chatMsg = com.alibaba.fastjson.JSONObject.toJavaObject(jsonObject, ChatMsg.class);
|
|
|
+ System.out.println(chatMsg);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
private Map<String, String> getAccessMap() {
|
|
|
String url=String.format("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=%s&corpsecret=%s",corpid,secret);
|
|
|
logger.debug("API获取access_token");
|