|
|
@@ -1,8 +1,12 @@
|
|
|
package com.xjrsoft.xjrsoftboot;
|
|
|
|
|
|
+import camundajar.impl.com.google.gson.JsonObject;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
+import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.xjrsoft.XjrSoftApplication;
|
|
|
+import com.xjrsoft.common.enums.WeChatType;
|
|
|
+import com.xjrsoft.common.utils.WeChatUtil;
|
|
|
import com.xjrsoft.module.organization.dto.WeChatSendMessageDto;
|
|
|
import com.xjrsoft.module.organization.service.IWeChatService;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
@@ -23,6 +27,9 @@ class WechatMessageTest {
|
|
|
@Autowired
|
|
|
private IWeChatService weChatService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private WeChatUtil weChatUtil;
|
|
|
+
|
|
|
@Test
|
|
|
void test(){
|
|
|
|
|
|
@@ -57,4 +64,17 @@ class WechatMessageTest {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getRidInfo(){
|
|
|
+ String token = weChatUtil.getToken(WeChatType.WEWEB);
|
|
|
+ String url = "https://api.weixin.qq.com/cgi-bin/openapi/rid/get?access_token=" + token;
|
|
|
+
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("rid", "686b6714-61e7b031-42b4ea15");
|
|
|
+ String result = HttpUtil.post(url, JSONObject.toJSONString(object));
|
|
|
+
|
|
|
+ System.out.println(result);
|
|
|
+ }
|
|
|
+
|
|
|
}
|