mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-15 04:48:18 +08:00
🎨 批量修复部分javadoc里的错误标签或不规范代码
This commit is contained in:
@@ -255,11 +255,9 @@ public interface WxMpCardService {
|
||||
String addTestWhiteList(String openid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 创建卡券
|
||||
* </pre>
|
||||
*
|
||||
* @param cardCreateRequest 卡券创建请求对象
|
||||
* @param cardCreateMessage 卡券创建请求对象
|
||||
* @return 卡券创建结果对象
|
||||
* @throws WxErrorException 微信API调用异常,可能包括:
|
||||
* <ul>
|
||||
|
||||
@@ -37,8 +37,8 @@ public interface WxMpCommentService {
|
||||
* @param msgDataId 群发返回的msg_data_id
|
||||
* @param index 多图文时,用来指定第几篇图文,从0开始,不带默认操作该msg_data_id的第一篇图文
|
||||
* @param begin 起始位置
|
||||
* @param count 获取数目(>=50会被拒绝)
|
||||
* @param type type=0 普通评论&精选评论 type=1 普通评论 type=2 精选评论
|
||||
* @param count 获取数目(大于等于50会被拒绝)
|
||||
* @param type type=0 普通评论和精选评论 type=1 普通评论 type=2 精选评论
|
||||
* @return 评论列表数据 wx mp comment list vo
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
|
||||
@@ -60,10 +60,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeArticleResult> getArticleSummary(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取图文群发总数据(getarticletotal)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getarticletotal?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度1天,endDate不能早于begingDate
|
||||
@@ -73,10 +76,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeArticleTotal> getArticleTotal(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取图文统计数据(getuserread)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getuserread?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度3天,endDate不能早于begingDate
|
||||
@@ -86,10 +92,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeArticleResult> getUserRead(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取图文统计分时数据(getuserreadhour)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getuserreadhour?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度1天,endDate不能早于begingDate
|
||||
@@ -99,10 +108,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeArticleResult> getUserReadHour(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取图文分享转发数据(getusershare)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getusershare?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度7天,endDate不能早于begingDate
|
||||
@@ -112,10 +124,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeArticleResult> getUserShare(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取图文分享转发分时数据(getusersharehour)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141084&token=&lang=zh_CN">图文分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getusersharehour?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度1天,endDate不能早于begingDate
|
||||
@@ -127,10 +142,13 @@ public interface WxMpDataCubeService {
|
||||
//*******************消息分析数据接口***********************//
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息发送概况数据(getupstreammsg)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsg?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度7天,endDate不能早于begingDate
|
||||
@@ -140,10 +158,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeMsgResult> getUpstreamMsg(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息分送分时数据(getupstreammsghour)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsghour?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度1天,endDate不能早于begingDate
|
||||
@@ -153,10 +174,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeMsgResult> getUpstreamMsgHour(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息发送周数据(getupstreammsgweek)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsgweek?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度30天,endDate不能早于begingDate
|
||||
@@ -166,10 +190,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeMsgResult> getUpstreamMsgWeek(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息发送月数据(getupstreammsgmonth)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsgmonth?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度30天,endDate不能早于begingDate
|
||||
@@ -179,10 +206,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeMsgResult> getUpstreamMsgMonth(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息发送分布数据(getupstreammsgdist)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsgdist?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度15天,endDate不能早于begingDate
|
||||
@@ -192,10 +222,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeMsgResult> getUpstreamMsgDist(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息发送分布周数据(getupstreammsgdistweek)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsgdistweek?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度30天,endDate不能早于begingDate
|
||||
@@ -205,10 +238,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeMsgResult> getUpstreamMsgDistWeek(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取消息发送分布月数据(getupstreammsgdistmonth)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141085&token=&lang=zh_CN">消息分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getupstreammsgdistmonth?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度30天,endDate不能早于begingDate
|
||||
@@ -220,10 +256,13 @@ public interface WxMpDataCubeService {
|
||||
//*******************接口分析数据接口***********************//
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取接口分析数据(getinterfacesummary)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141086&token=&lang=zh_CN">接口分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141086&token=&lang=zh_CN">接口分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getinterfacesummary?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度30天,endDate不能早于begingDate
|
||||
@@ -233,10 +272,13 @@ public interface WxMpDataCubeService {
|
||||
List<WxDataCubeInterfaceResult> getInterfaceSummary(Date beginDate, Date endDate) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取接口分析分时数据(getinterfacesummaryhour)
|
||||
* 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141086&token=&lang=zh_CN">接口分析数据接口</a>
|
||||
* <p>
|
||||
* {@code 详情请见文档:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141086&token=&lang=zh_CN">接口分析数据接口</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* 接口url格式:https://api.weixin.qq.com/datacube/getinterfacesummaryhour?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
*
|
||||
* @param beginDate 开始时间
|
||||
* @param endDate 最大时间跨度1天,endDate不能早于begingDate
|
||||
|
||||
@@ -54,10 +54,10 @@ public interface WxMpService extends WxService {
|
||||
WxMpShortKeyResult fetchShorten(String shortKey) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 验证消息的确来自微信服务器.
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN
|
||||
* </pre>
|
||||
* <p>
|
||||
* {@code 详情请见: <a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN">接入指南</a>}
|
||||
* </p>
|
||||
*
|
||||
* @param timestamp 时间戳,字符串格式
|
||||
* @param nonce 随机串,字符串格式
|
||||
@@ -76,16 +76,19 @@ public interface WxMpService extends WxService {
|
||||
String getAccessToken() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取access_token,本方法线程安全.
|
||||
* <p>
|
||||
* 且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限
|
||||
*
|
||||
* </p>
|
||||
* <p>
|
||||
* 另:本service的所有方法都会在access_token过期时调用此方法
|
||||
*
|
||||
* </p>
|
||||
* <p>
|
||||
* 程序员在非必要情况下尽量不要主动调用此方法
|
||||
*
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140183&token=&lang=zh_CN
|
||||
* </pre>
|
||||
* </p>
|
||||
* <p>
|
||||
* {@code 详情请见: <a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140183&token=&lang=zh_CN">获取access_token</a>}
|
||||
* </p>
|
||||
*
|
||||
* @param forceRefresh 是否强制刷新,true表示强制刷新,false表示使用缓存
|
||||
* @return token access token,字符串格式
|
||||
@@ -126,12 +129,13 @@ public interface WxMpService extends WxService {
|
||||
String getJsapiTicket() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获得jsapi_ticket.
|
||||
* <p>
|
||||
* 获得时会检查jsapiToken是否过期,如果过期了,那么就刷新一下,否则就什么都不干
|
||||
*
|
||||
* 详情请见:http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN
|
||||
* </pre>
|
||||
* </p>
|
||||
* <p>
|
||||
* {@code 详情请见:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN">JS-SDK使用权限签名算法</a>}
|
||||
* </p>
|
||||
*
|
||||
* @param forceRefresh 强制刷新,true表示强制刷新,false表示使用缓存
|
||||
* @return jsapi ticket,字符串格式
|
||||
@@ -140,11 +144,10 @@ public interface WxMpService extends WxService {
|
||||
String getJsapiTicket(boolean forceRefresh) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 创建调用jsapi时所需要的签名.
|
||||
*
|
||||
* 详情请见:http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN
|
||||
* </pre>
|
||||
* <p>
|
||||
* {@code 详情请见:<a href="http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN">JS-SDK使用权限签名算法</a>}
|
||||
* </p>
|
||||
*
|
||||
* @param url 当前网页的URL,不包括#及其后面部分
|
||||
* @return 生成的签名对象,包含签名、时间戳、随机串等信息
|
||||
@@ -153,10 +156,10 @@ public interface WxMpService extends WxService {
|
||||
WxJsapiSignature createJsapiSignature(String url) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 长链接转短链接接口.
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=长链接转短链接接口
|
||||
* </pre>
|
||||
* <p>
|
||||
* 详情请见: 长链接转短链接接口
|
||||
* </p>
|
||||
*
|
||||
* @param longUrl 长url,需要转换的原始URL
|
||||
* @return 生成的短地址,字符串格式
|
||||
@@ -167,10 +170,10 @@ public interface WxMpService extends WxService {
|
||||
String shortUrl(String longUrl) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 语义查询接口.
|
||||
* 详情请见:http://mp.weixin.qq.com/wiki/index.php?title=语义理解
|
||||
* </pre>
|
||||
* <p>
|
||||
* 详情请见:语义理解
|
||||
* </p>
|
||||
*
|
||||
* @param semanticQuery 查询条件,包含查询内容、类型等信息
|
||||
* @return 查询结果,包含语义理解的结果和建议回复
|
||||
@@ -179,11 +182,13 @@ public interface WxMpService extends WxService {
|
||||
WxMpSemanticQueryResult semanticQuery(WxMpSemanticQuery semanticQuery) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 构造第三方使用网站应用授权登录的url.
|
||||
* 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN">网站应用微信登录开发指南</a>
|
||||
* URL格式为:https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
|
||||
* </pre>
|
||||
* <p>
|
||||
* {@code 详情请见: <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN">网站应用微信登录开发指南</a>}
|
||||
* </p>
|
||||
* <p>
|
||||
* {@code URL格式为:https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect}
|
||||
* </p>
|
||||
*
|
||||
* @param redirectUri 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
|
||||
* @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔,网页应用目前仅填写snsapi_login即可
|
||||
@@ -193,10 +198,7 @@ public interface WxMpService extends WxService {
|
||||
String buildQrConnectUrl(String redirectUri, String scope, String state);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取微信服务器IP地址
|
||||
* http://mp.weixin.qq.com/wiki/0/2ad4b6bfd29f30f71d39616c2a0fcedc.html
|
||||
* </pre>
|
||||
*
|
||||
* @return 微信服务器ip地址数组,包含所有微信服务器IP地址
|
||||
* @throws WxErrorException 微信API调用异常
|
||||
@@ -204,11 +206,10 @@ public interface WxMpService extends WxService {
|
||||
String[] getCallbackIP() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 网络检测
|
||||
* https://mp.weixin.qq.com/wiki?t=resource/res_main&id=21541575776DtsuT
|
||||
* 为了帮助开发者排查回调连接失败的问题,提供这个网络检测的API。它可以对开发者URL做域名解析,然后对所有IP进行一次ping操作,得到丢包率和耗时。
|
||||
* </pre>
|
||||
* 网络检测
|
||||
* <p>
|
||||
* 为了帮助开发者排查回调连接失败的问题,提供这个网络检测的API。它可以对开发者URL做域名解析,然后对所有IP进行一次ping操作,得到丢包率和耗时。
|
||||
* </p>
|
||||
*
|
||||
* @param action 执行的检测动作,可选值:all(全部检测)、dns(仅域名解析)、ping(仅网络连通性检测)
|
||||
* @param operator 指定平台从某个运营商进行检测,可选值:CHINANET(中国电信)、UNICOM(中国联通)、CAP(中国联通)、CUCC(中国联通)
|
||||
@@ -239,12 +240,13 @@ public interface WxMpService extends WxService {
|
||||
WxMpCurrentAutoReplyInfo getCurrentAutoReplyInfo() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 公众号调用或第三方平台帮公众号调用对公众号的所有api调用(包括第三方帮其调用)次数进行清零:
|
||||
* HTTP调用:https://api.weixin.qq.com/cgi-bin/clear_quota?access_token=ACCESS_TOKEN
|
||||
* 接口文档地址:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433744592
|
||||
*
|
||||
* </pre>
|
||||
* 公众号调用或第三方平台帮公众号调用对公众号的所有api调用(包括第三方帮其调用)次数进行清零.
|
||||
* <p>
|
||||
* HTTP调用:https://api.weixin.qq.com/cgi-bin/clear_quota?access_token=ACCESS_TOKEN
|
||||
* </p>
|
||||
* <p>
|
||||
* {@code 接口文档地址:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433744592}
|
||||
* </p>
|
||||
*
|
||||
* @param appid 公众号的APPID,需要清零调用的公众号的appid
|
||||
* @throws WxErrorException 微信API调用异常
|
||||
@@ -252,11 +254,9 @@ public interface WxMpService extends WxService {
|
||||
void clearQuota(String appid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Service没有实现某个API的时候,可以用这个,
|
||||
* 比{@link #get}和{@link #post}方法更灵活,可以自己构造RequestExecutor用来处理不同的参数和不同的返回类型。
|
||||
* 可以参考,{@link MediaUploadRequestExecutor}的实现方法
|
||||
* </pre>
|
||||
*
|
||||
* @param <T> 返回值类型
|
||||
* @param <E> 参数类型
|
||||
|
||||
@@ -304,8 +304,9 @@ public abstract class BaseWxMpServiceImpl<H, P> implements WxMpService, RequestH
|
||||
/**
|
||||
* 通过网络请求获取稳定版接口调用凭据
|
||||
*
|
||||
* @return .
|
||||
* @throws IOException .
|
||||
* @param forceRefresh 是否强制刷新
|
||||
* @return access_token字符串
|
||||
* @throws IOException IO异常
|
||||
*/
|
||||
protected abstract String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException;
|
||||
|
||||
|
||||
@@ -25,11 +25,11 @@ public class WxMpMassOpenIdsMessage implements Serializable {
|
||||
/**
|
||||
* <pre>
|
||||
* 请使用
|
||||
* {@link WxConsts.MassMsgType#IMAGE}
|
||||
* {@link WxConsts.MassMsgType#MPNEWS}
|
||||
* {@link WxConsts.MassMsgType#TEXT}
|
||||
* {@link WxConsts.MassMsgType#MPVIDEO}
|
||||
* {@link WxConsts.MassMsgType#VOICE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#IMAGE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#MPNEWS}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#MPVIDEO}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#VOICE}
|
||||
* 如果msgtype和media_id不匹配的话,会返回系统繁忙的错误
|
||||
* </pre>
|
||||
*/
|
||||
@@ -60,6 +60,8 @@ public class WxMpMassOpenIdsMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 添加openid,最多支持10,000个
|
||||
*
|
||||
* @param openid 用户openid
|
||||
*/
|
||||
public void addUser(String openid) {
|
||||
this.toUsers.add(openid);
|
||||
|
||||
@@ -19,11 +19,11 @@ public class WxMpMassPreviewMessage implements Serializable {
|
||||
* <pre>
|
||||
* 消息类型
|
||||
* 请使用
|
||||
* {@link WxConsts.MassMsgType#IMAGE}
|
||||
* {@link WxConsts.MassMsgType#MPNEWS}
|
||||
* {@link WxConsts.MassMsgType#TEXT}
|
||||
* {@link WxConsts.MassMsgType#MPVIDEO}
|
||||
* {@link WxConsts.MassMsgType#VOICE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#IMAGE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#MPNEWS}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#MPVIDEO}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#VOICE}
|
||||
* 如果msgtype和media_id不匹配的话,会返回系统繁忙的错误
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@@ -24,11 +24,11 @@ public class WxMpMassTagMessage implements Serializable {
|
||||
* <pre>
|
||||
* 消息类型.
|
||||
* 请使用
|
||||
* {@link WxConsts.MassMsgType#IMAGE}
|
||||
* {@link WxConsts.MassMsgType#MPNEWS}
|
||||
* {@link WxConsts.MassMsgType#TEXT}
|
||||
* {@link WxConsts.MassMsgType#MPVIDEO}
|
||||
* {@link WxConsts.MassMsgType#VOICE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#IMAGE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#MPNEWS}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#MPVIDEO}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.MassMsgType#VOICE}
|
||||
* 如果msgtype和media_id不匹配的话,会返回系统繁忙的错误
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
@@ -63,9 +63,8 @@ public class WxMpUserQuery implements Serializable {
|
||||
/**
|
||||
* 添加一个OpenId到列表中,并返回本对象
|
||||
* <p>
|
||||
* <pre>
|
||||
* 该方法默认lang = zh_CN
|
||||
* </pre>
|
||||
* </p>
|
||||
*
|
||||
* @param openid openid
|
||||
* @return {@link WxMpUserQuery}
|
||||
@@ -100,6 +99,8 @@ public class WxMpUserQuery implements Serializable {
|
||||
|
||||
/**
|
||||
* 获取查询参数列表
|
||||
*
|
||||
* @return 查询参数列表
|
||||
*/
|
||||
public List<WxMpUserQueryParam> getQueryParamList() {
|
||||
return this.queryParamList;
|
||||
|
||||
@@ -8,7 +8,9 @@ import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @author S <sshzh90@gmail.com>
|
||||
* 卡券图文消息HTML结果
|
||||
*
|
||||
* @author S (sshzh90@gmail.com)
|
||||
*/
|
||||
@Data
|
||||
public class WxMpCardMpnewsGethtmlResult implements Serializable {
|
||||
|
||||
@@ -39,8 +39,8 @@ public class MemberCardActivateUserFormRequest implements Serializable {
|
||||
/**
|
||||
* 绑定老会员卡信息
|
||||
*
|
||||
* @param name
|
||||
* @param url
|
||||
* @param name 名称
|
||||
* @param url 链接地址
|
||||
*/
|
||||
public void setBindOldCard(String name, String url) {
|
||||
if (StringUtils.isAnyEmpty(name, url)) {
|
||||
@@ -56,8 +56,8 @@ public class MemberCardActivateUserFormRequest implements Serializable {
|
||||
/**
|
||||
* 设置服务声明,用于放置商户会员卡守则
|
||||
*
|
||||
* @param name
|
||||
* @param url
|
||||
* @param name 名称
|
||||
* @param url 链接地址
|
||||
*/
|
||||
public void setServiceStatement(String name, String url) {
|
||||
if (StringUtils.isAnyEmpty(name, url)) {
|
||||
|
||||
@@ -50,6 +50,7 @@ public class MemberCardUserForm implements Serializable {
|
||||
/**
|
||||
* 添加富文本类型字段
|
||||
*
|
||||
* @param field 富文本字段
|
||||
*/
|
||||
public void addRichField(MemberCardUserFormRichField field) {
|
||||
if (field == null) {
|
||||
@@ -64,6 +65,7 @@ public class MemberCardUserForm implements Serializable {
|
||||
/**
|
||||
* 添加微信选项类型字段
|
||||
*
|
||||
* @param fieldType 微信字段类型
|
||||
*/
|
||||
public void addWechatField(CardWechatFieldType fieldType) {
|
||||
if (fieldType == null) {
|
||||
@@ -78,6 +80,7 @@ public class MemberCardUserForm implements Serializable {
|
||||
/**
|
||||
* 添加文本类型字段
|
||||
*
|
||||
* @param field 文本字段
|
||||
*/
|
||||
public void addCustomField(String field) {
|
||||
if (StringUtils.isBlank(field)) {
|
||||
|
||||
@@ -6,12 +6,13 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 控制原生消息结构体,包含各字段的消息控制字段。
|
||||
*
|
||||
* <p>
|
||||
* 用于 `7 更新会员信息` 的接口参数调用
|
||||
* https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283
|
||||
* </pre>
|
||||
* </p>
|
||||
* <p>
|
||||
* {@code 参考:<a href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283">会员卡接口</a>}
|
||||
* </p>
|
||||
*
|
||||
* @author YuJian(mgcnrx11@gmail.com)
|
||||
* @version 2017/7/15
|
||||
|
||||
@@ -6,10 +6,10 @@ import lombok.Data;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 用于 `7 更新会员信息` 的接口调用后的返回结果
|
||||
* https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283
|
||||
* </pre>
|
||||
* <p>
|
||||
* {@code 参考:<a href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283">会员卡接口</a>}
|
||||
* </p>
|
||||
*
|
||||
* @author YuJian(mgcnrx11@gmail.com)
|
||||
* @version 2017/7/15
|
||||
|
||||
@@ -6,11 +6,10 @@ import lombok.Data;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 拉取会员信息返回的结果
|
||||
*
|
||||
* 字段格式参考https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 6.2.1小节的步骤5
|
||||
* </pre>
|
||||
* <p>
|
||||
* {@code 字段格式参考:<a href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283">会员卡接口</a> 6.2.1小节的步骤5}
|
||||
* </p>
|
||||
*
|
||||
* @author YuJian
|
||||
* @version 2017/7/9
|
||||
|
||||
@@ -45,6 +45,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得文本消息builder.
|
||||
*
|
||||
* @return 文本消息builder
|
||||
*/
|
||||
public static TextBuilder TEXT() {
|
||||
return new TextBuilder();
|
||||
@@ -52,6 +54,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得图片消息builder.
|
||||
*
|
||||
* @return 图片消息builder
|
||||
*/
|
||||
public static ImageBuilder IMAGE() {
|
||||
return new ImageBuilder();
|
||||
@@ -59,6 +63,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得语音消息builder.
|
||||
*
|
||||
* @return 语音消息builder
|
||||
*/
|
||||
public static VoiceBuilder VOICE() {
|
||||
return new VoiceBuilder();
|
||||
@@ -66,6 +72,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得视频消息builder.
|
||||
*
|
||||
* @return 视频消息builder
|
||||
*/
|
||||
public static VideoBuilder VIDEO() {
|
||||
return new VideoBuilder();
|
||||
@@ -73,6 +81,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得音乐消息builder.
|
||||
*
|
||||
* @return 音乐消息builder
|
||||
*/
|
||||
public static MusicBuilder MUSIC() {
|
||||
return new MusicBuilder();
|
||||
@@ -80,6 +90,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得图文消息(点击跳转到外链)builder.
|
||||
*
|
||||
* @return 图文消息builder
|
||||
*/
|
||||
public static NewsBuilder NEWS() {
|
||||
return new NewsBuilder();
|
||||
@@ -87,6 +99,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得图文消息(点击跳转到图文消息页面)builder.
|
||||
*
|
||||
* @return 图文消息builder
|
||||
*/
|
||||
public static MpNewsBuilder MPNEWS() {
|
||||
return new MpNewsBuilder();
|
||||
@@ -94,6 +108,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得卡券消息builder.
|
||||
*
|
||||
* @return 卡券消息builder
|
||||
*/
|
||||
public static WxCardBuilder WXCARD() {
|
||||
return new WxCardBuilder();
|
||||
@@ -101,6 +117,8 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得菜单消息builder.
|
||||
*
|
||||
* @return 菜单消息builder
|
||||
*/
|
||||
public static WxMsgMenuBuilder MSGMENU() {
|
||||
return new WxMsgMenuBuilder();
|
||||
@@ -108,20 +126,25 @@ public class WxMpKefuMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 小程序卡片.
|
||||
*
|
||||
* @return 小程序卡片builder
|
||||
*/
|
||||
public static MiniProgramPageBuilder MINIPROGRAMPAGE() {
|
||||
return new MiniProgramPageBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送图文消息(点击跳转到图文消息页面)使用通过 “发布” 系列接口得到的 article_id(草稿箱功能上线后不再支持客服接口中带 media_id 的 mpnews 类型的图文消息)
|
||||
* 发送图文消息(点击跳转到图文消息页面)使用通过 “发布” 系列接口得到的 article_id
|
||||
*
|
||||
* @return 图文消息builder
|
||||
*/
|
||||
public static MpNewsArticleBuilder MPNEWSARTICLE() {
|
||||
return new MpNewsArticleBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 设置消息类型
|
||||
* <p>
|
||||
* 请使用
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#IMAGE}
|
||||
@@ -135,7 +158,9 @@ public class WxMpKefuMessage implements Serializable {
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#TASKCARD}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MSGMENU}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MP_NEWS_ARTICLE}
|
||||
* </pre>
|
||||
* </p>
|
||||
*
|
||||
* @param msgType 消息类型
|
||||
*/
|
||||
public void setMsgType(String msgType) {
|
||||
this.msgType = msgType;
|
||||
|
||||
@@ -927,6 +927,7 @@ public class WxMpXmlMessage implements Serializable {
|
||||
* @param timestamp 时间戳
|
||||
* @param nonce 随机串
|
||||
* @param msgSignature 签名串
|
||||
* @return 解密后的消息对象
|
||||
*/
|
||||
public static WxMpXmlMessage fromEncryptedXml(String encryptedXml, WxMpConfigStorage wxMpConfigStorage,
|
||||
String timestamp, String nonce, String msgSignature) {
|
||||
@@ -956,14 +957,16 @@ public class WxMpXmlMessage implements Serializable {
|
||||
/**
|
||||
* <pre>
|
||||
* 当接受用户消息时,可能会获得以下值:
|
||||
* {@link WxConsts.XmlMsgType#TEXT}
|
||||
* {@link WxConsts.XmlMsgType#IMAGE}
|
||||
* {@link WxConsts.XmlMsgType#VOICE}
|
||||
* {@link WxConsts.XmlMsgType#VIDEO}
|
||||
* {@link WxConsts.XmlMsgType#LOCATION}
|
||||
* {@link WxConsts.XmlMsgType#LINK}
|
||||
* {@link WxConsts.XmlMsgType#EVENT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#IMAGE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#VOICE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#VIDEO}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#LOCATION}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#LINK}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#EVENT}
|
||||
* </pre>
|
||||
*
|
||||
* @return 消息类型
|
||||
*/
|
||||
public String getMsgType() {
|
||||
return this.msgType;
|
||||
@@ -972,13 +975,15 @@ public class WxMpXmlMessage implements Serializable {
|
||||
/**
|
||||
* <pre>
|
||||
* 当发送消息的时候使用:
|
||||
* {@link WxConsts.XmlMsgType#TEXT}
|
||||
* {@link WxConsts.XmlMsgType#IMAGE}
|
||||
* {@link WxConsts.XmlMsgType#VOICE}
|
||||
* {@link WxConsts.XmlMsgType#VIDEO}
|
||||
* {@link WxConsts.XmlMsgType#NEWS}
|
||||
* {@link WxConsts.XmlMsgType#MUSIC}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#IMAGE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#VOICE}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#VIDEO}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#NEWS}
|
||||
* {@link me.chanjar.weixin.common.api.WxConsts.XmlMsgType#MUSIC}
|
||||
* </pre>
|
||||
*
|
||||
* @param msgType 消息类型
|
||||
*/
|
||||
public void setMsgType(String msgType) {
|
||||
this.msgType = msgType;
|
||||
|
||||
@@ -70,6 +70,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得文本消息builder
|
||||
*
|
||||
* @return 文本消息构建器
|
||||
*/
|
||||
public static TextBuilder TEXT() {
|
||||
return new TextBuilder();
|
||||
@@ -77,6 +79,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得图片消息builder
|
||||
*
|
||||
* @return 图片消息构建器
|
||||
*/
|
||||
public static ImageBuilder IMAGE() {
|
||||
return new ImageBuilder();
|
||||
@@ -84,6 +88,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得语音消息builder
|
||||
*
|
||||
* @return 语音消息构建器
|
||||
*/
|
||||
public static VoiceBuilder VOICE() {
|
||||
return new VoiceBuilder();
|
||||
@@ -91,6 +97,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得视频消息builder
|
||||
*
|
||||
* @return 视频消息构建器
|
||||
*/
|
||||
public static VideoBuilder VIDEO() {
|
||||
return new VideoBuilder();
|
||||
@@ -98,6 +106,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得音乐消息builder
|
||||
*
|
||||
* @return 音乐消息构建器
|
||||
*/
|
||||
public static MusicBuilder MUSIC() {
|
||||
return new MusicBuilder();
|
||||
@@ -105,6 +115,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得图文消息builder
|
||||
*
|
||||
* @return 图文消息构建器
|
||||
*/
|
||||
public static NewsBuilder NEWS() {
|
||||
return new NewsBuilder();
|
||||
@@ -112,6 +124,8 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得客服消息builder
|
||||
*
|
||||
* @return 客服消息构建器
|
||||
*/
|
||||
public static TransferCustomerServiceBuilder TRANSFER_CUSTOMER_SERVICE() {
|
||||
return new TransferCustomerServiceBuilder();
|
||||
@@ -119,11 +133,18 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 获得设备消息builder
|
||||
*
|
||||
* @return 设备消息builder
|
||||
*/
|
||||
public static DeviceBuilder DEVICE() {
|
||||
return new DeviceBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换成xml格式
|
||||
*
|
||||
* @return xml格式字符串
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public String toXml() {
|
||||
return XStreamTransformer.toXml((Class<WxMpXmlOutMessage>) this.getClass(), this);
|
||||
@@ -131,6 +152,9 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 转换成加密的结果
|
||||
*
|
||||
* @param wxMpConfigStorage 公众号配置
|
||||
* @return 加密后的消息对象
|
||||
*/
|
||||
public WxMpXmlOutMessage toEncrypted(WxMpConfigStorage wxMpConfigStorage) {
|
||||
String plainXml = toXml();
|
||||
@@ -146,6 +170,9 @@ public abstract class WxMpXmlOutMessage implements Serializable {
|
||||
|
||||
/**
|
||||
* 转换成加密的xml格式
|
||||
*
|
||||
* @param wxMpConfigStorage 公众号配置
|
||||
* @return 加密后的xml格式字符串
|
||||
*/
|
||||
public String toEncryptedXml(WxMpConfigStorage wxMpConfigStorage) {
|
||||
String plainXml = toXml();
|
||||
|
||||
@@ -9,7 +9,8 @@ import java.io.Serializable;
|
||||
/**
|
||||
* <pre>
|
||||
* 查询群发消息发送状态【订阅号与服务号认证后均可用】
|
||||
* https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html#%E6%9F%A5%E8%AF%A2%E7%BE%A4%E5%8F%91%E6%B6%88%E6%81%AF%E5%8F%91%E9%80%81%E7%8A%B6%E6%80%81%E3%80%90%E8%AE%A2%E9%98%85%E5%8F%B7%E4%B8%8E%E6%9C%8D%E5%8A%A1%E5%8F%B7%E8%AE%A4%E8%AF%81%E5%90%8E%E5%9D%87%E5%8F%AF%E7%94%A8%E3%80%91
|
||||
* 文档地址:https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Batch_Sends_and_Originality_Checks.html
|
||||
* </pre>
|
||||
* @author S <sshzh90@gmail.com>
|
||||
*/
|
||||
@Data
|
||||
|
||||
@@ -24,7 +24,7 @@ public interface WxMpConfigStorage {
|
||||
* Is use stable access token api
|
||||
*
|
||||
* @return the boolean
|
||||
* @link https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html
|
||||
* @see <a href="https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html">文档</a>
|
||||
*/
|
||||
boolean isStableAccessToken();
|
||||
|
||||
@@ -211,6 +211,8 @@ public interface WxMpConfigStorage {
|
||||
* <pre>
|
||||
* {@link me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl#setRetrySleepMillis(int)}
|
||||
* </pre>
|
||||
*
|
||||
* @return 重试间隔毫秒数
|
||||
*/
|
||||
int getRetrySleepMillis();
|
||||
|
||||
@@ -219,6 +221,8 @@ public interface WxMpConfigStorage {
|
||||
* <pre>
|
||||
* {@link me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl#setMaxRetryTimes(int)}
|
||||
* </pre>
|
||||
*
|
||||
* @return 最大重试次数
|
||||
*/
|
||||
int getMaxRetryTimes();
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ public class WxMpRedisConfigImpl extends WxMpDefaultConfigImpl {
|
||||
|
||||
/**
|
||||
* 每个公众号生成独有的存储key.
|
||||
*
|
||||
* @param appId 公众号appId
|
||||
*/
|
||||
@Override
|
||||
public void setAppId(String appId) {
|
||||
|
||||
@@ -42,6 +42,8 @@ public class WxMpRedissonConfigImpl extends WxMpDefaultConfigImpl {
|
||||
|
||||
/**
|
||||
* 每个公众号生成独有的存储key.
|
||||
*
|
||||
* @param appId 公众号appId
|
||||
*/
|
||||
@Override
|
||||
public void setAppId(String appId) {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class WxMpEventConstants {
|
||||
public static final String SUBMIT_MEMBERCARD_USER_INFO = "submit_membercard_user_info";
|
||||
|
||||
/**
|
||||
* 微信摇一摇周边>>摇一摇事件通知.
|
||||
* 微信摇一摇周边-摇一摇事件通知.
|
||||
*/
|
||||
public static final String SHAKEAROUND_USER_SHAKE = "ShakearoundUserShake";
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class WxMpCryptUtil extends me.chanjar.weixin.common.util.crypto.WxCryptU
|
||||
/**
|
||||
* 构造函数
|
||||
*
|
||||
* @param wxMpConfigStorage
|
||||
* @param wxMpConfigStorage 公众号配置存储
|
||||
*/
|
||||
public WxMpCryptUtil(WxMpConfigStorage wxMpConfigStorage) {
|
||||
/*
|
||||
|
||||
@@ -33,7 +33,12 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* xml -> pojo.
|
||||
* {@code xml -> pojo.}
|
||||
*
|
||||
* @param <T> 返回类型
|
||||
* @param clazz 类型
|
||||
* @param xml xml字符串
|
||||
* @return 转换后的对象
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T fromXml(Class<T> clazz, String xml) {
|
||||
@@ -41,6 +46,14 @@ public class XStreamTransformer {
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@code xml -> pojo.}
|
||||
*
|
||||
* @param <T> 返回类型
|
||||
* @param clazz 类型
|
||||
* @param is 输入流
|
||||
* @return 转换后的对象
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T fromXml(Class<T> clazz, InputStream is) {
|
||||
T object = (T) CLASS_2_XSTREAM_INSTANCE.get(clazz).fromXML(is);
|
||||
@@ -48,7 +61,12 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* pojo -> xml.
|
||||
* {@code pojo -> xml.}
|
||||
*
|
||||
* @param <T> 类型参数
|
||||
* @param clazz 类型
|
||||
* @param object 对象
|
||||
* @return xml字符串
|
||||
*/
|
||||
public static <T> String toXml(Class<T> clazz, T object) {
|
||||
return CLASS_2_XSTREAM_INSTANCE.get(clazz).toXML(object);
|
||||
|
||||
Reference in New Issue
Block a user