76 Star 473 Fork 191

hm-tools / hm-tools-wxmp-adapter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
readme.md 2.17 KB
一键复制 编辑 原始数据 按行查看 历史
JHybo 提交于 2020-06-07 00:22 . maven center

Maven Central

前言

本组件对应实现微信公众平台“账号管理”章节相关api接口,原接口文档地址:账号管理

接口说明

  • top.hmtools.wxmp.account.apis.IQrcodeApis 对应实现“带参数的二维码”相关接口。
  • top.hmtools.wxmp.account.apis.IShortUrlApis 对应实现“长链接转短链接接口”相关接口。

事件消息类说明

  • top.hmtools.wxmp.account.models.eventMessage包下对应实现“微信认证事件推送”相关xml数据对应的Javabean数据结构。可参阅 top.hmtools.wxmp.account.enums.EQRActionName , top.hmtools.wxmp.account.enums.EVerifyEventMessages

使用示例

  1. 引用jar包
<dependency>
  <groupId>top.hmtools</groupId>
  <artifactId>wxmp-account</artifactId>
  <version>1.0.0</version>
</dependency>
  1. 获取wxmpSession,参照 wxmp-core/readme.md
//2 获取动态代理对象实例
IQrcodeApis qrcodeApis = this.wxmpSession.getMapper(IQrcodeApis.class);

//3 创建二维码ticket
QRCodeParam codeParam = new QRCodeParam();

ActionInfo action_info = new ActionInfo();
Scene scene = new Scene();
scene.setScene_str("aaaabbbbcccc");
action_info.setScene(scene);
codeParam.setAction_info(action_info);

codeParam.setAction_name(EQRActionName.QR_STR_SCENE);

codeParam.setExpire_seconds(20*60*60*60L);
QRCodeResult create = this.qrcodeApis.create(codeParam);

更多示例参见:

2020.06.01 账号管理组件全部测试 OK top.hmtools.wxmp.account.enums.EVerifyEventMessagesTest 中使用了自动填充Javabean数据工具

Java
1
https://gitee.com/hm-tools/hm-tools-wxmp-adapter.git
git@gitee.com:hm-tools/hm-tools-wxmp-adapter.git
hm-tools
hm-tools-wxmp-adapter
hm-tools-wxmp-adapter
master

搜索帮助