You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
41 lines
1.3 KiB
package com.mh.user; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
import com.google.gson.JsonObject; |
|
import com.mh.user.service.wechat.WechatUserInfoService; |
|
import lombok.extern.slf4j.Slf4j; |
|
import org.junit.jupiter.api.Test; |
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
/** |
|
* @author LJF |
|
* @version 1.0 |
|
* @project mh_esi |
|
* @description 微信测试 |
|
* @date 2024-11-28 14:03:01 |
|
*/ |
|
@Slf4j |
|
public class WechatTest extends UserServiceApplicationTests{ |
|
|
|
@Autowired |
|
private WechatUserInfoService wechatUserInfoService; |
|
|
|
@Test |
|
public void testInertWechatUserInfo() |
|
{ |
|
String test = "{" + |
|
" \"openid\": \"o0qeN5lw4JquQy_H9Rk5QN-CyMRU\"," + |
|
" \"nickname\": \"道法自然\"," + |
|
" \"sex\": 0," + |
|
" \"language\": \"\"," + |
|
" \"city\": \"\"," + |
|
" \"province\": \"\"," + |
|
" \"country\": \"\"," + |
|
" \"headimgurl\": \"https://thirdwx.qlogo.cn/mmopen/vi_32/PiajxSqBRaEI5eF3IWJv4l884KWkjngFSE5VQdlHzZ5YqYAHE7eticnZVyBhPDuObiawraByzMHDY5e8YiboprN9kljwIUYdehiaxkjsKGgpFicM2rtZQk9Q7dBw/132\"," + |
|
" \"privilege\": []" + |
|
"}"; |
|
JSONObject jsonObject = JSONObject.parseObject(test); |
|
wechatUserInfoService.existsUser(jsonObject); |
|
|
|
} |
|
}
|
|
|