类 WechatMPUtil
java.lang.Object
org.anyline.wechat.util.WechatUtil
org.anyline.wechat.mp.util.WechatMPUtil
-
字段概要
从类继承的字段 org.anyline.wechat.util.WechatUtil
log -
构造器概要
构造器构造器说明WechatMPUtil(String key, org.anyline.entity.DataRow config) WechatMPUtil(WechatMPConfig config) -
方法概要
修饰符和类型方法说明org.anyline.entity.DataRowaddUserTag(List<String> users, int tag) 为用户添加标签static StringcreateAuthUrl(String key, String redirect, WechatConfig.SNSAPI_SCOPE scope, String state) 创建登录连接createMenu(Menu menu) 创建菜单org.anyline.entity.DataRowcreateQrCode(String code) org.anyline.entity.DataRowcreateQrCode(String code, int sec) 生成临时二维码org.anyline.entity.DataRow删除所以菜单org.anyline.entity.DataRowdeleteMenu(String menu) 删除指定菜单getAuthInfo(String code) static WechatMPUtilstatic WechatMPUtilgetInstance(String key) org.anyline.entity.DataRowgetMenu()getUnionId(String openid) getUserInfo(String openid) booleanisSubscribe(String openid) 是否已关注参与签名的字段包括 noncestr(随机字符串), jsapi_ticket timestamp(时间戳 url(当前网页的URL,不包含#及其后面部分) 对所有待签名参数按照字段名的ASCII 码从小到大排序(字典序)后, 使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串string1.org.anyline.entity.DataRownewJsapiTicket(String accessToken) static WechatMPUtilsendTemplateMessage(String openId, WechatTemplateMessage msg) 发送样模板消息从类继承的方法 org.anyline.wechat.util.WechatUtil
getAccessToken, getAuthInfo, getPublicKey, getUserInfo, profit, sign, validateSign, validateSign
-
构造器详细资料
-
WechatMPUtil
-
WechatMPUtil
-
-
方法详细资料
-
getInstance
-
reg
-
getInstance
-
getConfig
-
getAccessToken
-
getJsapiTicket
-
newJsapiTicket
-
jsapiSign
参与签名的字段包括 noncestr(随机字符串), jsapi_ticket timestamp(时间戳 url(当前网页的URL,不包含#及其后面部分) 对所有待签名参数按照字段名的ASCII 码从小到大排序(字典序)后, 使用URL键值对的格式(即key1=value1&key2=value2…)拼接成字符串string1.- 参数:
params- params- 返回:
- String
-
jsapiSign
-
getAuthInfo
-
getOpenId
-
getUserInfo
-
getUnionId
-
isSubscribe
是否已关注- 参数:
openid- openid- 返回:
- boolean
-
createAuthUrl
public static String createAuthUrl(String key, String redirect, WechatConfig.SNSAPI_SCOPE scope, String state) 创建登录连接- 参数:
key- 配置文件的key默认defaultredirect- redirect 登录成功后得定向地址scope- scope 获取信息范围state- state 原样返回- 返回:
- String
-
sendTemplateMessage
发送样模板消息- 参数:
msg- msg- 返回:
- WechatTemplateMessageResult
-
sendTemplateMessage
-
createQrCode
-
createQrCode
生成临时二维码- 参数:
code- 场景值sec- 有效时间(秒)- 返回:
- DataRow
-
addUserTag
为用户添加标签- 参数:
users- 用户openid列表tag- 标签id- 返回:
- DataRow
-
createMenu
创建菜单- 参数:
menu- 菜单内容- 返回:
- 菜单id
-
deleteMenu
public org.anyline.entity.DataRow deleteMenu()删除所以菜单- 返回:
- DataRow
-
deleteMenu
删除指定菜单- 参数:
menu- 菜单id- 返回:
- DataRow
-
getMenu
public org.anyline.entity.DataRow getMenu()
-