1 Star 0 Fork 191

xaq84 / hm-tools-wxmp-adapter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
IUnionIDApiTest.java 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
package top.hmtools.wxmp.user.apis;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import top.hmtools.wxmp.user.BaseTest;
import top.hmtools.wxmp.user.model.BatchUserInfoParam;
import top.hmtools.wxmp.user.model.BatchUserInfoResult;
import top.hmtools.wxmp.user.model.UserInfoParam;
import top.hmtools.wxmp.user.model.UserInfoResult;
public class IUnionIDApiTest extends BaseTest{
private IUnionIDApi iUnionIDApi ;
@Test
public void testGetUserInfo() {
UserInfoParam userInfoParam = new UserInfoParam();
userInfoParam.setOpenid("o-OZ0v8HcoPJiNlZLTOZYrkeZUG0");
UserInfoResult userInfo = this.iUnionIDApi.getUserInfo(userInfoParam);
this.printFormatedJson("获取用户基本信息(UnionID机制)-获取用户基本信息(包括UnionID机制)", userInfo);
}
@Test
public void testGetBatchUserInfo() {
BatchUserInfoParam batchUserInfoParam = new BatchUserInfoParam();
UserInfoParam userInfoParam = new UserInfoParam();
userInfoParam.setOpenid("o-OZ0v8HcoPJiNlZLTOZYrkeZUG0");
List<UserInfoParam> user_list = new ArrayList<>();
user_list.add(userInfoParam);
batchUserInfoParam.setUser_list(user_list);
BatchUserInfoResult batchUserInfo = this.iUnionIDApi.getBatchUserInfo(batchUserInfoParam);
this.printFormatedJson("获取用户基本信息(UnionID机制)-批量获取用户基本信息", batchUserInfo);
}
@Override
public void initSub() {
this.iUnionIDApi = this.wxmpSession.getMapper(IUnionIDApi.class);
}
}
Java
1
https://gitee.com/adrian.xu/hm-tools-wxmp-adapter.git
git@gitee.com:adrian.xu/hm-tools-wxmp-adapter.git
adrian.xu
hm-tools-wxmp-adapter
hm-tools-wxmp-adapter
master

搜索帮助