mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 批量修复部分javadoc里的错误标签或不规范代码
This commit is contained in:
@@ -12,7 +12,7 @@ import static me.chanjar.weixin.common.error.WxMpErrorMsgEnum.*;
|
||||
/**
|
||||
* 微信开发所使用到的常量类.
|
||||
*
|
||||
* @author Daniel Qian & binarywang & Wang_Wong
|
||||
* @author Daniel Qian, binarywang, Wang_Wong
|
||||
*/
|
||||
@UtilityClass
|
||||
public class WxConsts {
|
||||
|
||||
@@ -7,7 +7,10 @@ import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842
|
||||
* OAuth2 AccessToken
|
||||
* <p>
|
||||
* 参考:{@code https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140842}
|
||||
* </p>
|
||||
*
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
@@ -36,8 +39,10 @@ public class WxOAuth2AccessToken implements Serializable {
|
||||
private Integer snapshotUser;
|
||||
|
||||
/**
|
||||
* https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11513156443eZYea&version=&lang=zh_CN.
|
||||
* 本接口在scope参数为snsapi_base时不再提供unionID字段。
|
||||
* <p>
|
||||
* 参考:{@code https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11513156443eZYea&version=&lang=zh_CN}
|
||||
* </p>
|
||||
*/
|
||||
@SerializedName("unionid")
|
||||
private String unionId;
|
||||
|
||||
@@ -453,7 +453,7 @@ public enum WxCpErrorMsgEnum {
|
||||
*/
|
||||
CODE_60008(60008, "部门已存在;部门ID或者部门名称已存在"),
|
||||
/**
|
||||
* 部门名称含有非法字符;不能含有 \\:?*“< >| 等字符.
|
||||
* {@code 部门名称含有非法字符;不能含有 \\:?*"< >| 等字符.}
|
||||
*/
|
||||
CODE_60009(60009, "部门名称含有非法字符;不能含有 \\ :?*“< >| 等字符"),
|
||||
/**
|
||||
@@ -521,7 +521,7 @@ public enum WxCpErrorMsgEnum {
|
||||
*/
|
||||
CODE_60124(60124, "无效的父部门id;父部门不存在通讯录中"),
|
||||
/**
|
||||
* 非法部门名字;不能为空,且不能超过64字节,且不能含有\\:*?”< >|等字符.
|
||||
* {@code 非法部门名字;不能为空,且不能超过64字节,且不能含有\\:*?"< >|等字符.}
|
||||
*/
|
||||
CODE_60125(60125, "非法部门名字;不能为空,且不能超过64字节,且不能含有\\:*?”< >|等字符"),
|
||||
/**
|
||||
|
||||
@@ -12,11 +12,13 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 微信错误码.
|
||||
* <p>
|
||||
* 请阅读:
|
||||
* 公众平台:<a href="https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Global_Return_Code.html">全局返回码说明</a>
|
||||
* 企业微信:<a href="https://work.weixin.qq.com/api/doc#10649">全局错误码</a>
|
||||
* </p>
|
||||
*
|
||||
* @author Daniel Qian & Binary Wang
|
||||
* @author Daniel Qian, Binary Wang
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
||||
@@ -46,23 +46,23 @@ public enum WxMaErrorMsgEnum {
|
||||
*/
|
||||
CODE_40003(40003, "openid 不正确"),
|
||||
/**
|
||||
* <pre>
|
||||
* 无效媒体文件类型
|
||||
* 对应操作:<code>uploadTempMedia</code>
|
||||
* <p>
|
||||
* 对应操作:{@code uploadTempMedia}
|
||||
* 对应地址:
|
||||
* POST https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE
|
||||
* {@code POST https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE}
|
||||
* 参考文档地址: https://developers.weixin.qq.com/miniprogram/dev/api/open-api/customer-message/uploadTempMedia.html
|
||||
* </pre>
|
||||
* </p>
|
||||
*/
|
||||
CODE_40004(40004, "无效媒体文件类型"),
|
||||
/**
|
||||
* <pre>
|
||||
* 无效媒体文件 ID.
|
||||
* 对应操作:<code>getTempMedia</code>
|
||||
* <p>
|
||||
* 对应操作:{@code getTempMedia}
|
||||
* 对应地址:
|
||||
* GET https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID
|
||||
* {@code GET https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id=MEDIA_ID}
|
||||
* 参考文档地址: https://developers.weixin.qq.com/miniprogram/dev/api/open-api/customer-message/getTempMedia.html
|
||||
* </pre>
|
||||
* </p>
|
||||
*/
|
||||
CODE_40007(40007, "无效媒体文件 ID"),
|
||||
/**
|
||||
@@ -99,29 +99,29 @@ public enum WxMaErrorMsgEnum {
|
||||
*/
|
||||
CODE_41028(41028, "form_id 不正确,或者过期"),
|
||||
/**
|
||||
* <pre>
|
||||
* code 或 template_id 不正确.
|
||||
* 对应操作:<code>code2Session</code>, <code>sendUniformMessage</code>, <code>sendTemplateMessage</code>
|
||||
* <p>
|
||||
* 对应操作:{@code code2Session}, {@code sendUniformMessage}, {@code sendTemplateMessage}
|
||||
* 对应地址:
|
||||
* GET https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code
|
||||
* {@code GET https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code}
|
||||
* POST https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN
|
||||
* POST https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=ACCESS_TOKEN
|
||||
* 参考文档地址: https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/code2Session.html
|
||||
* https://developers.weixin.qq.com/miniprogram/dev/api/open-api/uniform-message/sendUniformMessage.html
|
||||
* https://developers.weixin.qq.com/miniprogram/dev/api/open-api/template-message/sendTemplateMessage.html
|
||||
* </pre>
|
||||
* </p>
|
||||
*/
|
||||
CODE_41029(41029, "请求的参数不正确"),
|
||||
/**
|
||||
* <pre>
|
||||
* form_id 已被使用,或者所传page页面不存在,或者小程序没有发布
|
||||
* 对应操作:<code>sendUniformMessage</coce>, <code>getWXACodeUnlimit</code>
|
||||
* <p>
|
||||
* 对应操作:{@code sendUniformMessage}, {@code getWXACodeUnlimit}
|
||||
* 对应地址:
|
||||
* POST https://api.weixin.qq.com/cgi-bin/message/wxopen/template/uniform_send?access_token=ACCESS_TOKEN
|
||||
* POST https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN
|
||||
* 参考文档地址: https://developers.weixin.qq.com/miniprogram/dev/api/open-api/uniform-message/sendUniformMessage.html
|
||||
* https://developers.weixin.qq.com/miniprogram/dev/api/open-api/qr-code/getWXACodeUnlimit.html
|
||||
* </pre>
|
||||
* https://developers.weixin.qq.com/miniprogram/dev/api/open-api/qr-code/getWXACodeUnlimit.html
|
||||
* </p>
|
||||
*/
|
||||
CODE_41030(41030, "请求的参数不正确"),
|
||||
/**
|
||||
@@ -138,13 +138,13 @@ public enum WxMaErrorMsgEnum {
|
||||
*/
|
||||
CODE_45009(45009, "调用分钟频率受限"),
|
||||
/**
|
||||
* <pre>
|
||||
* 频率限制,每个用户每分钟100次.
|
||||
* 对应操作:<code>code2Session</code>
|
||||
* <p>
|
||||
* 对应操作:{@code code2Session}
|
||||
* 对应地址:
|
||||
* GET https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code
|
||||
* {@code GET https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code}
|
||||
* 参考文档地址: https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/code2Session.html
|
||||
* </pre>
|
||||
* </p>
|
||||
*/
|
||||
CODE_45011(45011, "频率限制,每个用户每分钟100次"),
|
||||
/**
|
||||
@@ -190,12 +190,13 @@ public enum WxMaErrorMsgEnum {
|
||||
*/
|
||||
CODE_45072(45072, "command字段取值不对"),
|
||||
/**
|
||||
* <pre>
|
||||
* 下发输入状态,需要之前30秒内跟用户有过消息交互.
|
||||
* 对应操作:<code>customerTyping</code>
|
||||
* <p>
|
||||
* 对应操作:{@code customerTyping}
|
||||
* 对应地址:
|
||||
* POST https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token=ACCESS_TOKEN
|
||||
* 参考文档地址: https://developers.weixin.qq.com/miniprogram/dev/api/open-api/customer-message/customerTyping.html
|
||||
* </p>
|
||||
*/
|
||||
CODE_45080(45080, "下发输入状态,需要之前30秒内跟用户有过消息交互"),
|
||||
/**
|
||||
@@ -686,7 +687,7 @@ public enum WxMaErrorMsgEnum {
|
||||
|
||||
/**
|
||||
* 89252
|
||||
* 法人&企业信息一致性校验中 front checking
|
||||
* {@code 法人&企业信息一致性校验中 front checking}
|
||||
*/
|
||||
CODE_89252(89252, "法人&企业信息一致性校验中"),
|
||||
|
||||
|
||||
@@ -527,7 +527,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_40099(40099, "invalid code, this code has consumed."),
|
||||
|
||||
/**
|
||||
* invalid DateInfo, Make Sure OldDateInfoType==NewDateInfoType && NewBeginTime<=OldBeginTime && OldEndTime<= NewEndTime
|
||||
* {@code invalid DateInfo, Make Sure OldDateInfoType==NewDateInfoType && NewBeginTime<=OldBeginTime && OldEndTime<= NewEndTime}
|
||||
*/
|
||||
CODE_40100(40100, "invalid DateInfo, Make Sure OldDateInfoType==NewDateInfoType && NewBeginTime<=OldBeginTime && OldEndTime<= NewEndTime"),
|
||||
|
||||
@@ -572,7 +572,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_40108(40108, "invalid client version"),
|
||||
|
||||
/**
|
||||
* too many code size, must <= 100
|
||||
* {@code too many code size, must <= 100}
|
||||
*/
|
||||
CODE_40109(40109, "too many code size, must <= 100"),
|
||||
|
||||
@@ -702,7 +702,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_40135(40135, "invalid not supply bonus, can not change card_id which supply bonus to be not supply"),
|
||||
|
||||
/**
|
||||
* invalid use DepositCodeMode, make sure sku.quantity>DepositCode.quantity
|
||||
* {@code invalid use DepositCodeMode, make sure sku.quantity>DepositCode.quantity}
|
||||
*/
|
||||
CODE_40136(40136, "invalid use DepositCodeMode, make sure sku.quantity>DepositCode.quantity"),
|
||||
|
||||
@@ -1082,7 +1082,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_40211(40211, "invalid scope_data"),
|
||||
|
||||
/**
|
||||
* paegs 当中存在不合法的query,query格式遵循URL标准,即k1=v1&k2=v2 invalid query
|
||||
* {@code paegs 当中存在不合法的query,query格式遵循URL标准,即k1=v1&k2=v2 invalid query}
|
||||
*/
|
||||
CODE_40212(40212, "paegs 当中存在不合法的query,query格式遵循URL标准,即k1=v1&k2=v2"),
|
||||
|
||||
@@ -4242,7 +4242,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_71005(71005, "limit exe count"),
|
||||
|
||||
/**
|
||||
* limit coin count, 1 <= coin_count <= 100000
|
||||
* {@code limit coin count, 1 <= coin_count <= 100000}
|
||||
*/
|
||||
CODE_71006(71006, "limit coin count, 1 <= coin_count <= 100000"),
|
||||
|
||||
@@ -4347,7 +4347,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_72018(72018, "duplicate order id, invoice had inserted to user"),
|
||||
|
||||
/**
|
||||
* limit msg operation card list size, must <= 5
|
||||
* {@code limit msg operation card list size, must <= 5}
|
||||
*/
|
||||
CODE_72019(72019, "limit msg operation card list size, must <= 5"),
|
||||
|
||||
@@ -6432,7 +6432,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_88009(88009, "reply is not exists"),
|
||||
|
||||
/**
|
||||
* count range error. cout <= 0 or count > 50
|
||||
* {@code count range error. cout <= 0 or count > 50}
|
||||
*/
|
||||
CODE_88010(88010, "count range error. cout <= 0 or count > 50"),
|
||||
|
||||
@@ -6682,7 +6682,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_89251(89251, "模板消息已下发,待法人人脸核身校验"),
|
||||
|
||||
/**
|
||||
* 法人&企业信息一致性校验中 front checking
|
||||
* {@code 法人&企业信息一致性校验中 front checking}
|
||||
*/
|
||||
CODE_89253(89253, "法人&企业信息一致性校验中"),
|
||||
|
||||
@@ -7257,7 +7257,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_200021(200021, "场景描述 sceneDesc 参数错误"),
|
||||
|
||||
/**
|
||||
* 禁止创建/更新商品(如商品创建功能被封禁) 或 禁止编辑&更新房间
|
||||
* {@code 禁止创建/更新商品(如商品创建功能被封禁) 或 禁止编辑&更新房间}
|
||||
*/
|
||||
CODE_300001(300001, "禁止创建/更新商品(如商品创建功能被封禁) 或 禁止编辑&更新房间"),
|
||||
|
||||
@@ -8382,7 +8382,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_9300003(9300003, "begin_time must less than end_time"),
|
||||
|
||||
/**
|
||||
* end_time - begin_time > 1year
|
||||
* {@code end_time - begin_time > 1year}
|
||||
*/
|
||||
CODE_9300004(9300004, "end_time - begin_time > 1year"),
|
||||
|
||||
@@ -8397,7 +8397,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_9300006(9300006, "invalid activity status"),
|
||||
|
||||
/**
|
||||
* gift_num must >0 and <=15
|
||||
* {@code gift_num must >0 and <=15}
|
||||
*/
|
||||
CODE_9300007(9300007, "gift_num must >0 and <=15"),
|
||||
|
||||
@@ -8412,7 +8412,7 @@ public enum WxOpenErrorMsgEnum {
|
||||
CODE_9300009(9300009, "activity can not finish"),
|
||||
|
||||
/**
|
||||
* card_info_list must >= 2
|
||||
* {@code card_info_list must >= 2}
|
||||
*/
|
||||
CODE_9300010(9300010, "card_info_list must >= 2"),
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@ import java.io.File;
|
||||
|
||||
/**
|
||||
* 基于小程序或 H5 的身份证、银行卡、行驶证 OCR 识别.
|
||||
* https://mp.weixin.qq.com/wiki?t=resource/res_main&id=21516712284rHWMX
|
||||
* <p>
|
||||
* 参考:{@code https://mp.weixin.qq.com/wiki?t=resource/res_main&id=21516712284rHWMX}
|
||||
* </p>
|
||||
*
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
* created on 2019-06-22
|
||||
|
||||
@@ -7,13 +7,12 @@ public interface InternalSessionManager {
|
||||
|
||||
/**
|
||||
* Return the active Session, associated with this Manager, with the
|
||||
* specified session id (if any); otherwise return <code>null</code>.
|
||||
* specified session id (if any); otherwise return {@code null}.
|
||||
*
|
||||
* @param id The session id for the session to be returned
|
||||
* @return the session or null
|
||||
* @throws IllegalStateException if a new session cannot be
|
||||
* instantiated for any reason
|
||||
* @throws java.io.IOException if an input/output error occurs while
|
||||
* processing this request
|
||||
*/
|
||||
InternalSession findSession(String id);
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class SignUtils {
|
||||
*
|
||||
* @param message 签名数据
|
||||
* @param key 签名密钥
|
||||
* @return 签名结果
|
||||
*/
|
||||
public static String createHmacSha256Sign(String message, String key) {
|
||||
try {
|
||||
|
||||
@@ -29,7 +29,10 @@ public class SHA1 {
|
||||
}
|
||||
|
||||
/**
|
||||
* 用&串接arr参数,生成sha1 digest.
|
||||
* {@code 用&串接arr参数,生成sha1 digest.}
|
||||
*
|
||||
* @param arr 参数数组
|
||||
* @return sha1摘要
|
||||
*/
|
||||
public static String genWithAmple(String... arr) {
|
||||
if (StringUtils.isAnyEmpty(arr)) {
|
||||
|
||||
@@ -197,6 +197,7 @@ public class WxCryptUtil {
|
||||
/**
|
||||
* 对明文进行加密.
|
||||
*
|
||||
* @param randomStr 随机字符串
|
||||
* @param plainText 需要加密的明文
|
||||
* @return 加密后base64编码的字符串
|
||||
*/
|
||||
|
||||
@@ -10,8 +10,9 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 输入流数据.
|
||||
* <p/>
|
||||
* <p>
|
||||
* InputStreamData
|
||||
* </p>
|
||||
*
|
||||
* @author zichuan.zhou91@gmail.com
|
||||
* created on 2022/2/15
|
||||
|
||||
@@ -21,42 +21,66 @@ public interface ApacheHttpClientBuilder {
|
||||
|
||||
/**
|
||||
* 代理服务器地址.
|
||||
*
|
||||
* @param httpProxyHost 代理服务器地址
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder httpProxyHost(String httpProxyHost);
|
||||
|
||||
/**
|
||||
* 代理服务器端口.
|
||||
*
|
||||
* @param httpProxyPort 代理服务器端口
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder httpProxyPort(int httpProxyPort);
|
||||
|
||||
/**
|
||||
* 代理服务器用户名.
|
||||
*
|
||||
* @param httpProxyUsername 代理服务器用户名
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder httpProxyUsername(String httpProxyUsername);
|
||||
|
||||
/**
|
||||
* 代理服务器密码.
|
||||
*
|
||||
* @param httpProxyPassword 代理服务器密码
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder httpProxyPassword(String httpProxyPassword);
|
||||
|
||||
/**
|
||||
* 重试策略.
|
||||
*
|
||||
* @param httpRequestRetryHandler 重试处理器
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder httpRequestRetryHandler(HttpRequestRetryHandler httpRequestRetryHandler );
|
||||
ApacheHttpClientBuilder httpRequestRetryHandler(HttpRequestRetryHandler httpRequestRetryHandler);
|
||||
|
||||
/**
|
||||
* 超时时间.
|
||||
*
|
||||
* @param keepAliveStrategy 保持连接策略
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder keepAliveStrategy(ConnectionKeepAliveStrategy keepAliveStrategy);
|
||||
|
||||
/**
|
||||
* ssl连接socket工厂.
|
||||
*
|
||||
* @param sslConnectionSocketFactory SSL连接Socket工厂
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder sslConnectionSocketFactory(SSLConnectionSocketFactory sslConnectionSocketFactory);
|
||||
|
||||
/**
|
||||
* 支持的TLS协议版本.
|
||||
* Supported TLS protocol versions.
|
||||
*
|
||||
* @param supportedProtocols 支持的协议版本数组
|
||||
* @return ApacheHttpClientBuilder
|
||||
*/
|
||||
ApacheHttpClientBuilder supportedProtocols(String[] supportedProtocols);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,11 @@ public class WxGsonBuilder {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建Gson实例
|
||||
*
|
||||
* @return Gson实例
|
||||
*/
|
||||
public static Gson create() {
|
||||
if (Objects.isNull(GSON_INSTANCE)) {
|
||||
synchronized (INSTANCE) {
|
||||
|
||||
@@ -22,6 +22,11 @@ public class XStreamInitializer {
|
||||
|
||||
public static ClassLoader classLoader;
|
||||
|
||||
/**
|
||||
* 设置类加载器
|
||||
*
|
||||
* @param classLoaderInfo 类加载器
|
||||
*/
|
||||
public static void setClassLoader(ClassLoader classLoaderInfo) {
|
||||
classLoader = classLoaderInfo;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
* 企业互联相关接口
|
||||
*
|
||||
* @author libo <422423229@qq.com>
|
||||
* Created on 27/2/2023 9:57 PM
|
||||
* @since 2023-02-27 9:57 PM
|
||||
*/
|
||||
public interface WxCpCorpGroupService {
|
||||
/**
|
||||
|
||||
@@ -85,7 +85,7 @@ public interface WxCpExportService {
|
||||
* 获取导出结果
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:<a href="https://qyapi.weixin.qq.com/cgi-bin/export/get_result?access_token=ACCESS_TOKEN&jobid=jobid_xxxxxxxxxxxxxxx">https://qyapi.weixin.qq.com/cgi-bin/export/get_result?access_token=ACCESS_TOKEN&jobid=jobid_xxxxxxxxxxxxxxx</a>
|
||||
* {@code 请求地址:<a href="https://qyapi.weixin.qq.com/cgi-bin/export/get_result?access_token=ACCESS_TOKEN&jobid=jobid_xxxxxxxxxxxxxxx">https://qyapi.weixin.qq.com/cgi-bin/export/get_result?access_token=ACCESS_TOKEN&jobid=jobid_xxxxxxxxxxxxxxx</a>}
|
||||
*
|
||||
* 文档地址:<a href="https://developer.work.weixin.qq.com/document/path/94854">https://developer.work.weixin.qq.com/document/path/94854</a>
|
||||
* 返回的url文件下载解密可参考 <a href="https://blog.csdn.net/a201692/article/details/123530529">CSDN</a>
|
||||
|
||||
@@ -146,7 +146,7 @@ public interface WxCpExternalContactService {
|
||||
* 企业可通过此接口,根据外部联系人的userid(如何获取?),拉取客户详情。
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID}
|
||||
*
|
||||
* 权限说明:
|
||||
*
|
||||
@@ -252,9 +252,9 @@ public interface WxCpExternalContactService {
|
||||
*
|
||||
* 权限说明:
|
||||
*
|
||||
* 该企业授权了该服务商第三方应用,且授权的第三方应用具备“企业客户权限->客户基础信息”权限
|
||||
* {@code 该企业授权了该服务商第三方应用,且授权的第三方应用具备“企业客户权限->客户基础信息”权限}
|
||||
* 该客户的跟进人必须在应用的可见范围之内
|
||||
* 应用需具备“企业客户权限->客户基础信息”权限
|
||||
* {@code 应用需具备“企业客户权限->客户基础信息”权限}
|
||||
* </pre>
|
||||
*
|
||||
* @param externalUserid 代开发自建应用获取到的外部联系人ID
|
||||
@@ -276,8 +276,8 @@ public interface WxCpExternalContactService {
|
||||
*
|
||||
* @param externalUserid 服务商主体的external_userid,必须是source_agentid对应的应用所获取
|
||||
* @param sourceAgentId 企业授权的代开发自建应用或第三方应用的agentid
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
* @return 企业的external_userid
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
String fromServiceExternalUserid(String externalUserid, String sourceAgentId) throws WxErrorException;
|
||||
|
||||
@@ -362,7 +362,7 @@ public interface WxCpExternalContactService {
|
||||
* 权限说明:
|
||||
*
|
||||
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)
|
||||
* 第三方应用需具有“企业客户权限->客户基础信息”权限
|
||||
* {@code 第三方应用需具有“企业客户权限->客户基础信息”权限}
|
||||
* 对于第三方/自建应用,群主必须在应用的可见范围
|
||||
* 仅支持企业服务人员创建的客户群
|
||||
* 仅可转换出自己企业下的客户群chat_id
|
||||
@@ -410,11 +410,12 @@ public interface WxCpExternalContactService {
|
||||
* 文档地址: https://developer.work.weixin.qq.com/document/path/99434
|
||||
* </pre>
|
||||
*
|
||||
* 注意:企业可通过外部联系人临时ID排除重复数据,外部联系人临时ID有效期为4小时。
|
||||
*
|
||||
* @param cursor the cursor
|
||||
* @param limit the limit
|
||||
* @return 已服务的外部联系人列表
|
||||
* @throws WxErrorException .
|
||||
* @apiNote 企业可通过外部联系人临时ID排除重复数据,外部联系人临时ID有效期为4小时。
|
||||
*/
|
||||
WxCpExternalContactListInfo getContactList(String cursor, Integer limit) throws WxErrorException;
|
||||
|
||||
@@ -438,7 +439,7 @@ public interface WxCpExternalContactService {
|
||||
* 企业可通过此接口获取指定成员添加的客户列表。客户是指配置了客户联系功能的成员所添加的外部联系人。没有配置客户联系功能的成员,所添加的外部联系人将不会作为客户返回。
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/list?access_token=ACCESS_TOKEN&userid=USERID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/list?access_token=ACCESS_TOKEN&userid=USERID}
|
||||
*
|
||||
* 权限说明:
|
||||
*
|
||||
@@ -469,7 +470,8 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* 获取待分配的离职成员列表
|
||||
* 企业和第三方可通过此接口,获取所有离职成员的客户列表,并可进一步调用分配离职成员的客户接口将这些客户重新分配给其他企业成员。
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 请求方式:POST(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_unassigned_list?access_token=ACCESS_TOKEN
|
||||
*
|
||||
@@ -496,17 +498,17 @@ public interface WxCpExternalContactService {
|
||||
|
||||
/**
|
||||
* 企业可通过此接口,转接在职成员的客户给其他成员。
|
||||
* <per>
|
||||
* <pre>
|
||||
* external_userid必须是handover_userid的客户(即配置了客户联系功能的成员所添加的联系人)。
|
||||
* 在职成员的每位客户最多被分配2次。客户被转接成功后,将有90个自然日的服务关系保护期,保护期内的客户无法再次被分配。
|
||||
* <p>
|
||||
*
|
||||
* 权限说明:
|
||||
* * 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
|
||||
* 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限
|
||||
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
|
||||
* {@code 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限}
|
||||
* 接替成员必须在此第三方应用或自建应用的可见范围内。
|
||||
* 接替成员需要配置了客户联系功能。
|
||||
* 接替成员需要在企业微信激活且已经过实名认证。
|
||||
* </per>
|
||||
* </pre>
|
||||
*
|
||||
* @param req 转接在职成员的客户给其他成员请求实体
|
||||
* @return wx cp base resp
|
||||
@@ -516,13 +518,13 @@ public interface WxCpExternalContactService {
|
||||
|
||||
/**
|
||||
* 企业和第三方可通过此接口查询在职成员的客户转接情况。
|
||||
* <per>
|
||||
* <pre>
|
||||
* 权限说明:
|
||||
* <p>
|
||||
*
|
||||
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
|
||||
* 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限
|
||||
* {@code 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限}
|
||||
* 接替成员必须在此第三方应用或自建应用的可见范围内。
|
||||
* </per>
|
||||
* </pre>
|
||||
*
|
||||
* @param handOverUserid 原添加成员的userid
|
||||
* @param takeOverUserid 接替成员的userid
|
||||
@@ -535,19 +537,21 @@ public interface WxCpExternalContactService {
|
||||
|
||||
/**
|
||||
* 企业可通过此接口,分配离职成员的客户给其他成员。
|
||||
* <per>
|
||||
* <pre>
|
||||
* handover_userid必须是已离职用户。
|
||||
* external_userid必须是handover_userid的客户(即配置了客户联系功能的成员所添加的联系人)。
|
||||
* 在职成员的每位客户最多被分配2次。客户被转接成功后,将有90个自然日的服务关系保护期,保护期内的客户无法再次被分配。
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 权限说明:
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
|
||||
* 第三方应用需拥有“企业客户权限->客户联系->离职分配”权限
|
||||
* {@code 第三方应用需拥有“企业客户权限->客户联系->离职分配”权限}
|
||||
* 接替成员必须在此第三方应用或自建应用的可见范围内。
|
||||
* 接替成员需要配置了客户联系功能。
|
||||
* 接替成员需要在企业微信激活且已经过实名认证。
|
||||
* </per>
|
||||
* </pre>
|
||||
*
|
||||
* @param req 转接在职成员的客户给其他成员请求实体
|
||||
* @return wx cp base resp
|
||||
@@ -557,13 +561,14 @@ public interface WxCpExternalContactService {
|
||||
|
||||
/**
|
||||
* 企业和第三方可通过此接口查询离职成员的客户分配情况。
|
||||
* <per>
|
||||
* <pre>
|
||||
* 权限说明:
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
|
||||
* 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限
|
||||
* {@code 第三方应用需拥有“企业客户权限->客户联系->在职继承”权限}
|
||||
* 接替成员必须在此第三方应用或自建应用的可见范围内。
|
||||
* </per>
|
||||
* </pre>
|
||||
*
|
||||
* @param handOverUserid 原添加成员的userid
|
||||
* @param takeOverUserid 接替成员的userid
|
||||
@@ -630,21 +635,24 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* 企业可通过此接口,将已离职成员为群主的群,分配给另一个客服成员。
|
||||
*
|
||||
* <per>
|
||||
* <pre>
|
||||
* 注意::
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 群主离职了的客户群,才可继承
|
||||
* 继承给的新群主,必须是配置了客户联系功能的成员
|
||||
* 继承给的新群主,必须有设置实名
|
||||
* 继承给的新群主,必须有激活企业微信
|
||||
* 同一个人的群,限制每天最多分配300个给新群主
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 权限说明:
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 企业需要使用“客户联系”secret或配置到“可调用应用”列表中的自建应用secret所获取的accesstoken来调用(accesstoken如何获取?)。
|
||||
* 第三方应用需拥有“企业客户权限->客户联系->分配离职成员的客户群”权限
|
||||
* {@code 第三方应用需拥有“企业客户权限->客户联系->分配离职成员的客户群”权限}
|
||||
* 对于第三方/自建应用,群主必须在应用的可见范围。
|
||||
* </per>
|
||||
* </pre>
|
||||
*
|
||||
* @param chatIds 需要转群主的客户群ID列表。取值范围: 1 ~ 100
|
||||
* @param newOwner 新群主ID
|
||||
@@ -656,7 +664,7 @@ public interface WxCpExternalContactService {
|
||||
|
||||
/**
|
||||
* 企业可通过此接口,将在职成员为群主的群,分配给另一个客服成员。
|
||||
* <per>
|
||||
* <pre>
|
||||
* 注意:
|
||||
* 继承给的新群主,必须是配置了客户联系功能的成员
|
||||
* 继承给的新群主,必须有设置实名
|
||||
@@ -716,11 +724,14 @@ public interface WxCpExternalContactService {
|
||||
* 企业可通过此接口添加企业群发消息的任务并通知客服人员发送给相关客户或客户群。(注:企业微信终端需升级到2.7.5版本及以上)
|
||||
* 注意:调用该接口并不会直接发送消息给客户/客户群,需要相关的客服人员操作以后才会实际发送(客服人员的企业微信需要升级到2.7.5及以上版本)
|
||||
* 同一个企业每个自然月内仅可针对一个客户/客户群发送4条消息,超过限制的用户将会被忽略。
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 请求方式: POST(HTTP)
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN
|
||||
* <p>
|
||||
|
||||
*
|
||||
* <a href="https://work.weixin.qq.com/api/doc/90000/90135/92135">文档地址</a>
|
||||
*
|
||||
* @param wxCpMsgTemplate the wx cp msg template
|
||||
@@ -733,15 +744,18 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* 提醒成员群发
|
||||
* 企业和第三方应用可调用此接口,重新触发群发通知,提醒成员完成群发任务,24小时内每个群发最多触发三次提醒。
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 请求方式: POST(HTTPS)
|
||||
* <p>
|
||||
|
||||
*
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/remind_groupmsg_send?access_token=ACCESS_TOKEN
|
||||
* <p>
|
||||
*
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/97610">文档地址</a>
|
||||
*
|
||||
* @param msgId 群发消息的id,通过获取群发记录列表接口返回
|
||||
* @return the wx cp msg template add result
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxCpBaseResp remindGroupMsgSend(String msgId) throws WxErrorException;
|
||||
|
||||
@@ -753,11 +767,12 @@ public interface WxCpExternalContactService {
|
||||
* 请求方式: POST(HTTPS)
|
||||
* <p>
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/cancel_groupmsg_send?access_token=ACCESS_TOKEN
|
||||
* <p>
|
||||
*
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/97611">文档地址</a>
|
||||
*
|
||||
* @param msgId 群发消息的id,通过获取群发记录列表接口返回
|
||||
* @return the wx cp msg template add result
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxCpBaseResp cancelGroupMsgSend(String msgId) throws WxErrorException;
|
||||
|
||||
@@ -1002,7 +1017,7 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* <pre>
|
||||
* 企业和第三方应用可通过此接口获取企业与成员的群发记录。
|
||||
* <a href="https://work.weixin.qq.com/api/doc/90000/90135/93338#获取企业群发成员执行结果">获取企业群发成员执行结果</a>
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/93338
|
||||
* </pre>
|
||||
*
|
||||
* @param msgid 群发消息的id,通过获取群发记录列表接口返回
|
||||
@@ -1031,7 +1046,7 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* <pre>
|
||||
* 获取群发成员发送任务列表。
|
||||
* <a href="https://work.weixin.qq.com/api/doc/90000/90135/93338#获取群发成员发送任务列表">获取群发成员发送任务列表</a>
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/93338
|
||||
* </pre>
|
||||
*
|
||||
* @param msgid 群发消息的id,通过获取群发记录列表接口返回
|
||||
@@ -1045,7 +1060,7 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* <pre>
|
||||
* 添加入群欢迎语素材。
|
||||
* <a href="https://open.work.weixin.qq.com/api/doc/90000/90135/92366#添加入群欢迎语素材">添加入群欢迎语素材</a>
|
||||
* 文档地址:https://open.work.weixin.qq.com/api/doc/90000/90135/92366
|
||||
* </pre>
|
||||
*
|
||||
* @param template 素材内容
|
||||
@@ -1057,7 +1072,7 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* <pre>
|
||||
* 编辑入群欢迎语素材。
|
||||
* <a href="https://open.work.weixin.qq.com/api/doc/90000/90135/92366#编辑入群欢迎语素材">编辑入群欢迎语素材</a>
|
||||
* 文档地址:https://open.work.weixin.qq.com/api/doc/90000/90135/92366
|
||||
* </pre>
|
||||
*
|
||||
* @param template the template
|
||||
@@ -1069,7 +1084,7 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* <pre>
|
||||
* 获取入群欢迎语素材。
|
||||
* <a href="https://open.work.weixin.qq.com/api/doc/90000/90135/92366#获取入群欢迎语素材">获取入群欢迎语素材</a>
|
||||
* 文档地址:https://open.work.weixin.qq.com/api/doc/90000/90135/92366
|
||||
* </pre>
|
||||
*
|
||||
* @param templateId 群欢迎语的素材id
|
||||
@@ -1082,7 +1097,7 @@ public interface WxCpExternalContactService {
|
||||
* <pre>
|
||||
* 删除入群欢迎语素材。
|
||||
* 企业可通过此API删除入群欢迎语素材,且仅能删除调用方自己创建的入群欢迎语素材。
|
||||
* <a href="https://open.work.weixin.qq.com/api/doc/90000/90135/92366#删除入群欢迎语素材">删除入群欢迎语素材</a>
|
||||
* 文档地址:https://open.work.weixin.qq.com/api/doc/90000/90135/92366
|
||||
* </pre>
|
||||
*
|
||||
* @param templateId 群欢迎语的素材id
|
||||
@@ -1094,8 +1109,8 @@ public interface WxCpExternalContactService {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取商品图册
|
||||
* <a href="https://work.weixin.qq.com/api/doc/90000/90135/95096#获取商品图册列表">获取商品图册列表</a>
|
||||
* 获取商品图册列表
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/95096
|
||||
* </pre>
|
||||
*
|
||||
* @param limit 返回的最大记录数,整型,最大值100,默认值50,超过最大值时取默认值
|
||||
@@ -1108,7 +1123,7 @@ public interface WxCpExternalContactService {
|
||||
/**
|
||||
* <pre>
|
||||
* 获取商品图册
|
||||
* <a href="https://work.weixin.qq.com/api/doc/90000/90135/95096#获取商品图册">获取商品图册</a>
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/95096
|
||||
* </pre>
|
||||
*
|
||||
* @param productId 商品id
|
||||
@@ -1155,7 +1170,7 @@ public interface WxCpExternalContactService {
|
||||
* 企业和第三方应用可以通过此接口新建敏感词规则
|
||||
* 请求方式:POST(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_intercept_rule?access_token=ACCESS_TOKEN
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param ruleAddRequest the rule add request
|
||||
* @return 规则id
|
||||
* @throws WxErrorException the wx error exception
|
||||
@@ -1169,7 +1184,7 @@ public interface WxCpExternalContactService {
|
||||
* 企业和第三方应用可以通过此接口修改敏感词规则
|
||||
* 请求方式:POST(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_intercept_rule?access_token=ACCESS_TOKEN
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param interceptRule the rule
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -1181,7 +1196,7 @@ public interface WxCpExternalContactService {
|
||||
* 企业和第三方应用可以通过此接口修改敏感词规则
|
||||
* 请求方式:POST(HTTPS)
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/externalcontact/del_intercept_rule?access_token=ACCESS_TOKEN">请求地址</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param ruleId 规则id
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -1220,7 +1235,7 @@ public interface WxCpExternalContactService {
|
||||
* 请求地址:
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_product_album?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_product_album?access_token=ACCESS_TOKEN</a>
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/95096#%E5%88%9B%E5%BB%BA%E5%95%86%E5%93%81%E5%9B%BE%E5%86%8C">文档地址</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param wxCpProductAlbumInfo 商品图册信息
|
||||
* @return 商品id string
|
||||
* @throws WxErrorException the wx error exception
|
||||
@@ -1235,7 +1250,7 @@ public interface WxCpExternalContactService {
|
||||
* 请求地址:
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_product_album?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/externalcontact/update_product_album?access_token=ACCESS_TOKEN</a>
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/95096#%E7%BC%96%E8%BE%91%E5%95%86%E5%93%81%E5%9B%BE%E5%86%8C">文档地址</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param wxCpProductAlbumInfo 商品图册信息
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -1250,7 +1265,7 @@ public interface WxCpExternalContactService {
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/externalcontact/delete_product_album?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/externalcontact/delete_product_album?access_token=ACCESS_TOKEN</a>
|
||||
*
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/95096#%E5%88%A0%E9%99%A4%E5%95%86%E5%93%81%E5%9B%BE%E5%86%8C">文档地址</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param productId 商品id
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -1379,7 +1394,7 @@ public interface WxCpExternalContactService {
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/customer_acquisition/statistic?access_token=ACCESS_TOKEN
|
||||
*
|
||||
* @author Hugo
|
||||
* @date 2023/12/5 14:34
|
||||
* @since 2023/12/5 14:34
|
||||
* @param linkId 获客链接的id
|
||||
* @param startTime 统计起始时间
|
||||
* @param endTime 统计结束时间
|
||||
|
||||
@@ -126,9 +126,10 @@ public interface WxCpGroupRobotService {
|
||||
|
||||
/**
|
||||
* 发送模板卡片消息
|
||||
* @param webhookUrl
|
||||
* @param wxCpGroupRobotMessage
|
||||
* @throws WxErrorException
|
||||
*
|
||||
* @param webhookUrl webhook地址
|
||||
* @param wxCpGroupRobotMessage 群机器人消息
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
void sendTemplateCardMessage(String webhookUrl, WxCpGroupRobotMessage wxCpGroupRobotMessage) throws WxErrorException;
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ public interface WxCpKfService {
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/kf/get_corp_statistic?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/kf/get_corp_statistic?access_token=ACCESS_TOKEN</a>
|
||||
* 文档地址:
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/95489">https://developer.work.weixin.qq.com/document/path/95489</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param request 查询参数
|
||||
* @return 客户数据统计 -企业汇总数据
|
||||
* @throws WxErrorException the wx error exception
|
||||
@@ -238,7 +238,7 @@ public interface WxCpKfService {
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/kf/get_servicer_statistic?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/kf/get_servicer_statistic?access_token=ACCESS_TOKEN</a>
|
||||
* 文档地址:
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/95490">https://developer.work.weixin.qq.com/document/path/95490</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param request 查询参数
|
||||
* @return 客户数据统计 -企业汇总数据
|
||||
* @throws WxErrorException the wx error exception
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface WxCpLivingService {
|
||||
/**
|
||||
* 获取直播详情
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/living/get_living_info?access_token=ACCESS_TOKEN&livingid=LIVINGID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/living/get_living_info?access_token=ACCESS_TOKEN&livingid=LIVINGID}
|
||||
*
|
||||
* @param livingId 直播id
|
||||
* @return 获取的直播详情 living info
|
||||
|
||||
@@ -110,9 +110,9 @@ public interface WxCpMediaService {
|
||||
* 获取高清语音素材.
|
||||
* 可以使用本接口获取从JSSDK的uploadVoice接口上传的临时语音素材,格式为speex,16K采样率。该音频比上文的临时素材获取接口(格式为amr,8K采样率)更加清晰,适合用作语音识别等对音质要求较高的业务。
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/media/get/jssdk?access_token=ACCESS_TOKEN&media_id=MEDIA_ID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/media/get/jssdk?access_token=ACCESS_TOKEN&media_id=MEDIA_ID}
|
||||
* 仅企业微信2.4及以上版本支持。
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc#90000/90135/90255
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/90255
|
||||
* </pre>
|
||||
*
|
||||
* @param mediaId 媒体id
|
||||
|
||||
@@ -72,8 +72,9 @@ public interface WxCpMessageService {
|
||||
* 请求地址: https://qyapi.weixin.qq.com/cgi-bin/message/recall?access_token=ACCESS_TOKEN
|
||||
* 文档地址: https://developer.work.weixin.qq.com/document/path/94867
|
||||
* </pre>
|
||||
*
|
||||
* @param msgId 消息id
|
||||
* @throws WxErrorException
|
||||
* @throws WxErrorException 异常
|
||||
*/
|
||||
void recall(String msgId) throws WxErrorException;
|
||||
|
||||
|
||||
@@ -90,9 +90,10 @@ public interface WxCpOAuth2Service {
|
||||
/**
|
||||
* 获取家校访问用户身份
|
||||
* 该接口用于根据code获取家长或者学生信息
|
||||
* <p>
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/getuserinfo?access_token=ACCESS_TOKEN&code=CODE}
|
||||
* </pre>
|
||||
*
|
||||
* @param code the code
|
||||
* @return school user info
|
||||
@@ -123,7 +124,7 @@ public interface WxCpOAuth2Service {
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户登录身份
|
||||
* https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
|
||||
* {@code https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?access_token=ACCESS_TOKEN&code=CODE}
|
||||
* 该接口可使用用户登录成功颁发的code来获取成员信息,适用于自建应用与代开发应用
|
||||
*
|
||||
* 注意: 旧的/user/getuserinfo 接口的url已变更为auth/getuserinfo,不过旧接口依旧可以使用,建议是关注新接口即可
|
||||
@@ -140,13 +141,15 @@ public interface WxCpOAuth2Service {
|
||||
|
||||
/**
|
||||
* 获取用户二次验证信息
|
||||
* <p>
|
||||
* <pre>
|
||||
* api: https://qyapi.weixin.qq.com/cgi-bin/auth/get_tfa_info?access_token=ACCESS_TOKEN
|
||||
* 权限说明:仅『通讯录同步』或者自建应用可调用,如用自建应用调用,用户需要在二次验证范围和应用可见范围内。
|
||||
* 并发限制:20
|
||||
* </pre>
|
||||
*
|
||||
* @param code 用户进入二次验证页面时,企业微信颁发的code,每次成员授权带上的code将不一样,code只能使用一次,5分钟未被使用自动过期
|
||||
* @return me.chanjar.weixin.cp.bean.workbench.WxCpSecondVerificationInfo 二次验证授权码,开发者可以调用通过二次验证接口,解锁企业微信终端.tfa_code有效期五分钟,且只能使用一次。
|
||||
* @return 二次验证授权码,开发者可以调用通过二次验证接口,解锁企业微信终端.tfa_code有效期五分钟,且只能使用一次。
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxCpSecondVerificationInfo getTfaInfo(String code) throws WxErrorException;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public interface WxCpOaMeetingRoomService {
|
||||
* </pre>
|
||||
*
|
||||
* @param wxCpOaMeetingRoomBookingInfoRequest 会议室预定信息查询对象
|
||||
* @return 会议室预定信息
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpOaMeetingRoomBookingInfoResult getMeetingRoomBookingInfo(WxCpOaMeetingRoomBookingInfoRequest wxCpOaMeetingRoomBookingInfoRequest) throws WxErrorException;
|
||||
@@ -99,6 +100,7 @@ public interface WxCpOaMeetingRoomService {
|
||||
* </pre>
|
||||
*
|
||||
* @param wxCpOaMeetingRoomBookRequest 会议室预定对象
|
||||
* @return 预定结果
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpOaMeetingRoomBookResult bookingMeetingRoom(WxCpOaMeetingRoomBookRequest wxCpOaMeetingRoomBookRequest) throws WxErrorException;
|
||||
@@ -114,6 +116,7 @@ public interface WxCpOaMeetingRoomService {
|
||||
* </pre>
|
||||
*
|
||||
* @param wxCpOaMeetingRoomBookByScheduleRequest 会议室预定对象
|
||||
* @return 预定结果
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpOaMeetingRoomBookResult bookingMeetingRoomBySchedule(WxCpOaMeetingRoomBookByScheduleRequest wxCpOaMeetingRoomBookByScheduleRequest) throws WxErrorException;
|
||||
@@ -129,6 +132,7 @@ public interface WxCpOaMeetingRoomService {
|
||||
* </pre>
|
||||
*
|
||||
* @param wxCpOaMeetingRoomBookByMeetingRequest 会议室预定对象
|
||||
* @return 预定结果
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpOaMeetingRoomBookResult bookingMeetingRoomByMeeting(WxCpOaMeetingRoomBookByMeetingRequest wxCpOaMeetingRoomBookByMeetingRequest) throws WxErrorException;
|
||||
@@ -147,10 +151,10 @@ public interface WxCpOaMeetingRoomService {
|
||||
* @param wxCpOaMeetingRoomCancelBookRequest 取消预定会议室对象
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
void cancelBookMeetingRoom(WxCpOaMeetingRoomCancelBookRequest wxCpOaMeetingRoomCancelBookRequest) throws WxErrorException;
|
||||
void cancelBookMeetingRoom(WxCpOaMeetingRoomCancelBookRequest wxCpOaMeetingRoomCancelBookRequest) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* 根据会议室预定ID查询预定详情.
|
||||
* <pre>
|
||||
* 企业可通过此接口根据预定id查询相关会议室的预定情况
|
||||
@@ -161,8 +165,9 @@ public interface WxCpOaMeetingRoomService {
|
||||
* </pre>
|
||||
*
|
||||
* @param wxCpOaMeetingRoomBookingInfoByBookingIdRequest 根据会议室预定ID查询预定详情对象
|
||||
* @return 预定详情
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpOaMeetingRoomBookingInfoByBookingIdResult getBookingInfoByBookingId(WxCpOaMeetingRoomBookingInfoByBookingIdRequest wxCpOaMeetingRoomBookingInfoByBookingIdRequest) throws WxErrorException;
|
||||
WxCpOaMeetingRoomBookingInfoByBookingIdResult getBookingInfoByBookingId(WxCpOaMeetingRoomBookingInfoByBookingIdRequest wxCpOaMeetingRoomBookingInfoByBookingIdRequest) throws WxErrorException;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ import java.util.List;
|
||||
/**
|
||||
* 企业微信OA相关接口.
|
||||
*
|
||||
* @author Element & Wang_Wong created on 2019-04-06 10:52
|
||||
* @author Element, Wang_Wong
|
||||
* @since 2019-04-06 10:52
|
||||
*/
|
||||
public interface WxCpOaService {
|
||||
|
||||
@@ -331,7 +332,7 @@ public interface WxCpOaService {
|
||||
* <a href="https://qyapi.weixin.qq.com/cgi-bin/checkin/addcheckinuserface?access_token=ACCESS_TOKEN">https://qyapi.weixin.qq.com/cgi-bin/checkin/addcheckinuserface?access_token=ACCESS_TOKEN</a>
|
||||
* 文档地址:
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/93378">https://developer.work.weixin.qq.com/document/path/93378</a>
|
||||
* <pre>
|
||||
* </pre>
|
||||
* @param userId 需要录入的用户id
|
||||
* @param userFace 需要录入的人脸图片数据,需要将图片数据base64处理后填入,对已录入的人脸会进行更新处理
|
||||
* @throws WxErrorException the wx error exception
|
||||
|
||||
@@ -80,9 +80,10 @@ public interface WxCpSchoolService {
|
||||
|
||||
/**
|
||||
* 获取直播详情
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/living/get_living_info?access_token=ACCESS_TOKEN&livingid
|
||||
* =LIVINGID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/living/get_living_info?access_token=ACCESS_TOKEN&livingid=LIVINGID}
|
||||
* </pre>
|
||||
*
|
||||
* @param livingId the living id
|
||||
* @return living info
|
||||
|
||||
@@ -19,9 +19,10 @@ public interface WxCpSchoolUserService {
|
||||
/**
|
||||
* 获取访问用户身份
|
||||
* 该接口用于根据code获取成员信息
|
||||
* <p>
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo?access_token=ACCESS_TOKEN&code=CODE}
|
||||
* </pre>
|
||||
*
|
||||
* @param code the code
|
||||
* @return user info
|
||||
@@ -32,9 +33,10 @@ public interface WxCpSchoolUserService {
|
||||
/**
|
||||
* 获取家校访问用户身份
|
||||
* 该接口用于根据code获取家长或者学生信息
|
||||
* <p>
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/getuserinfo?access_token=ACCESS_TOKEN&code=CODE
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/getuserinfo?access_token=ACCESS_TOKEN&code=CODE}
|
||||
* </pre>
|
||||
*
|
||||
* @param code the code
|
||||
* @return school user info
|
||||
@@ -90,8 +92,10 @@ public interface WxCpSchoolUserService {
|
||||
|
||||
/**
|
||||
* 删除学生
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_student?access_token=ACCESS_TOKEN&userid=USERID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_student?access_token=ACCESS_TOKEN&userid=USERID}
|
||||
* </pre>
|
||||
*
|
||||
* @param studentUserId the student user id
|
||||
* @return wx cp base resp
|
||||
@@ -160,8 +164,10 @@ public interface WxCpSchoolUserService {
|
||||
|
||||
/**
|
||||
* 读取学生或家长
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/get?access_token=ACCESS_TOKEN&userid=USERID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/get?access_token=ACCESS_TOKEN&userid=USERID}
|
||||
* </pre>
|
||||
*
|
||||
* @param userId the user id
|
||||
* @return user
|
||||
@@ -171,9 +177,10 @@ public interface WxCpSchoolUserService {
|
||||
|
||||
/**
|
||||
* 获取部门成员详情
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID
|
||||
* &fetch_child=FETCH_CHILD
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID&fetch_child=FETCH_CHILD}
|
||||
* </pre>
|
||||
*
|
||||
* @param departmentId 获取的部门id
|
||||
* @param fetchChild 1/0:是否递归获取子部门下面的成员
|
||||
@@ -184,9 +191,10 @@ public interface WxCpSchoolUserService {
|
||||
|
||||
/**
|
||||
* 获取部门家长详情
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list_parent?access_token=ACCESS_TOKEN&department_id
|
||||
* =DEPARTMENT_ID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/list_parent?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID}
|
||||
* </pre>
|
||||
*
|
||||
* @param departmentId 获取的部门id
|
||||
* @return user list parent
|
||||
@@ -207,8 +215,10 @@ public interface WxCpSchoolUserService {
|
||||
|
||||
/**
|
||||
* 删除家长
|
||||
* <pre>
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_parent?access_token=ACCESS_TOKEN&userid=USERID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_parent?access_token=ACCESS_TOKEN&userid=USERID}
|
||||
* </pre>
|
||||
*
|
||||
* @param userId the user id
|
||||
* @return wx cp base resp
|
||||
@@ -256,7 +266,7 @@ public interface WxCpSchoolUserService {
|
||||
/**
|
||||
* 删除部门
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/delete?access_token=ACCESS_TOKEN&id=ID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/delete?access_token=ACCESS_TOKEN&id=ID}
|
||||
*
|
||||
* @param id the id
|
||||
* @return wx cp base resp
|
||||
@@ -292,10 +302,9 @@ public interface WxCpSchoolUserService {
|
||||
/**
|
||||
* 获取外部联系人详情
|
||||
* 学校可通过此接口,根据外部联系人的userid(如何获取?),拉取外部联系人详情。
|
||||
* <p>
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid
|
||||
* =EXTERNAL_USERID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get?access_token=ACCESS_TOKEN&external_userid=EXTERNAL_USERID}
|
||||
*
|
||||
* @param externalUserId 外部联系人的userid,注意不是学校成员的帐号
|
||||
* @return external contact
|
||||
@@ -306,9 +315,9 @@ public interface WxCpSchoolUserService {
|
||||
/**
|
||||
* 获取可使用的家长范围
|
||||
* 获取可在微信「学校通知-学校应用」使用该应用的家长范围,以学生或部门列表的形式返回。应用只能给该列表下的家长发送「学校通知」。注意该范围只能由学校的系统管理员在「管理端-家校沟通-配置」配置。
|
||||
* <p>
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/agent/get_allow_scope?access_token=ACCESS_TOKEN&agentid=AGENTID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/agent/get_allow_scope?access_token=ACCESS_TOKEN&agentid=AGENTID}
|
||||
*
|
||||
* @param agentId the agent id
|
||||
* @return allow scope
|
||||
@@ -332,7 +341,7 @@ public interface WxCpSchoolUserService {
|
||||
/**
|
||||
* 获取部门列表
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/list?access_token=ACCESS_TOKEN&id=ID
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/school/department/list?access_token=ACCESS_TOKEN&id=ID}
|
||||
*
|
||||
* @param id 部门id。获取指定部门及其下的子部门。 如果不填,默认获取全量组织架构
|
||||
* @return wx cp department list
|
||||
|
||||
@@ -584,7 +584,7 @@ public interface WxCpService extends WxService {
|
||||
/**
|
||||
* 企业互联的服务类对象
|
||||
*
|
||||
* @return
|
||||
* @return 企业互联服务对象
|
||||
*/
|
||||
WxCpCorpGroupService getCorpGroupService();
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface WxCpUserService {
|
||||
* <pre>
|
||||
* 获取部门成员详情
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID&fetch_child=FETCH_CHILD
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID&fetch_child=FETCH_CHILD}
|
||||
*
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/90201
|
||||
* </pre>
|
||||
@@ -213,7 +213,7 @@ public interface WxCpUserService {
|
||||
* 获取加入企业二维码。
|
||||
*
|
||||
* 请求方式:GET(HTTPS)
|
||||
* 请求地址:https://qyapi.weixin.qq.com/cgi-bin/corp/get_join_qrcode?access_token=ACCESS_TOKEN&size_type=SIZE_TYPE
|
||||
* {@code 请求地址:https://qyapi.weixin.qq.com/cgi-bin/corp/get_join_qrcode?access_token=ACCESS_TOKEN&size_type=SIZE_TYPE}
|
||||
*
|
||||
* 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/91714
|
||||
* </pre>
|
||||
|
||||
@@ -18,7 +18,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.LIST_SHA
|
||||
* 企业互联相关接口实现类
|
||||
*
|
||||
* @author libo <422423229@qq.com>
|
||||
* Created on 27/2/2023 9:57 PM
|
||||
* @since 2023-02-27 9:57 PM
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
/**
|
||||
* The type Wx cp external contact service.
|
||||
*
|
||||
* @author 曹祖鹏 & yuanqixun & Mr.Pan & Wang_Wong
|
||||
* @author 曹祖鹏, yuanqixun, Mr.Pan, Wang_Wong
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class WxCpExternalContactServiceImpl implements WxCpExternalContactService {
|
||||
|
||||
@@ -10,7 +10,8 @@ import java.io.Serializable;
|
||||
/**
|
||||
* 返回结果
|
||||
*
|
||||
* @author yqx & WangWong created on 2020/3/16
|
||||
* @author yqx, WangWong
|
||||
* @since 2020/3/16
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -216,7 +216,7 @@ public class WxCpTpAuthInfo extends WxCpBaseResp {
|
||||
|
||||
/**
|
||||
* 付费状态
|
||||
* <br/>
|
||||
* <br>
|
||||
* <ul>
|
||||
* <li>0-没有付费;</li>
|
||||
* <li>1-限时试用;</li>
|
||||
|
||||
@@ -225,7 +225,7 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
|
||||
|
||||
/**
|
||||
* 付费状态
|
||||
* <br/>
|
||||
* <br>
|
||||
* <ul>
|
||||
* <li>0-没有付费;</li>
|
||||
* <li>1-限时试用;</li>
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.io.Serializable;
|
||||
* The type Wx cp tp tag.
|
||||
*
|
||||
* @author zhangq <zhangq002@gmail.com>
|
||||
* @since 2021 -02-14 16:15 16:15
|
||||
* @since 2021-02-14 16:15
|
||||
*/
|
||||
@Data
|
||||
public class WxCpTpTag implements Serializable {
|
||||
|
||||
@@ -6,7 +6,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
* 企业微信第三方开发-增加标签成员成员api响应体
|
||||
*
|
||||
* @author zhangq <zhangq002@gmail.com>
|
||||
* @since 2021 /2/14 16:44
|
||||
* @since 2021/2/14 16:44
|
||||
*/
|
||||
public class WxCpTpTagAddOrRemoveUsersResult extends WxCpTagAddOrRemoveUsersResult {
|
||||
private static final long serialVersionUID = 3490401800490702052L;
|
||||
|
||||
@@ -6,7 +6,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
* 获取标签成员接口响应体
|
||||
*
|
||||
* @author zhangq <zhangq002@gmail.com>
|
||||
* @since 2021 /2/14 16:28
|
||||
* @since 2021/2/14 16:28
|
||||
*/
|
||||
public class WxCpTpTagGetResult extends WxCpTagGetResult {
|
||||
private static final long serialVersionUID = 9051748686315562400L;
|
||||
|
||||
@@ -14,10 +14,9 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业群发消息任务
|
||||
* <p>
|
||||
* Created by songfan on 2020/7/14.
|
||||
*
|
||||
* @author songfan & Mr.Pan
|
||||
* @author songfan, Mr.Pan
|
||||
* @since 2020/7/14
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
||||
@@ -12,7 +12,8 @@ import java.util.List;
|
||||
/**
|
||||
* 离职员工外部联系人列表
|
||||
*
|
||||
* @author yqx & Wang_Wong created on 2020/3/15
|
||||
* @author yqx, Wang_Wong
|
||||
* @since 2020/3/15
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -10,7 +10,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
* 获客链接的使用详情
|
||||
*
|
||||
* @author Hugo
|
||||
* @date 2023/12/11 10:31
|
||||
* @since 2023/12/11 10:31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
@@ -10,9 +10,10 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Date: 2024-03-07 17:02
|
||||
* @Author: shenliuming
|
||||
* @return:
|
||||
* 防骚扰规则详情
|
||||
*
|
||||
* @author shenliuming
|
||||
* @since 2024-03-07 17:02
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
@@ -9,9 +9,10 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Date: 2024-03-07 15:54
|
||||
* @Author: shenliuming
|
||||
* @return:
|
||||
* 防骚扰规则列表
|
||||
*
|
||||
* @author shenliuming
|
||||
* @since 2024-03-07 15:54
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
@@ -33,6 +33,7 @@ public class Attachment implements Serializable {
|
||||
* Sets image.
|
||||
*
|
||||
* @param image the image
|
||||
* @return this
|
||||
*/
|
||||
public Attachment setImage(Image image) {
|
||||
this.image = image;
|
||||
@@ -44,6 +45,7 @@ public class Attachment implements Serializable {
|
||||
* Sets link.
|
||||
*
|
||||
* @param link the link
|
||||
* @return this
|
||||
*/
|
||||
public Attachment setLink(Link link) {
|
||||
this.link = link;
|
||||
@@ -55,6 +57,7 @@ public class Attachment implements Serializable {
|
||||
* Sets mini program.
|
||||
*
|
||||
* @param miniProgram the mini program
|
||||
* @return this
|
||||
*/
|
||||
public Attachment setMiniProgram(MiniProgram miniProgram) {
|
||||
this.miniProgram = miniProgram;
|
||||
@@ -66,6 +69,7 @@ public class Attachment implements Serializable {
|
||||
* Sets video.
|
||||
*
|
||||
* @param video the video
|
||||
* @return this
|
||||
*/
|
||||
public Attachment setVideo(Video video) {
|
||||
this.video = video;
|
||||
@@ -77,6 +81,7 @@ public class Attachment implements Serializable {
|
||||
* Sets file.
|
||||
*
|
||||
* @param file the file
|
||||
* @return this
|
||||
*/
|
||||
public Attachment setFile(File file) {
|
||||
this.file = file;
|
||||
|
||||
@@ -27,10 +27,10 @@ public class WxCpKfAccountLink implements Serializable {
|
||||
* 场景值,字符串类型,由开发者自定义。
|
||||
* 不多于32字节
|
||||
* 字符串取值范围(正则表达式):[0-9a-zA-Z_-]*
|
||||
* <p>
|
||||
*
|
||||
* 1. 若scene非空,返回的客服链接开发者可拼接scene_param=SCENE_PARAM参数使用,用户进入会话事件会将SCENE_PARAM原样返回。
|
||||
* 其中SCENE_PARAM需要urlencode,且长度不能超过128字节。
|
||||
* 如 https://work.weixin.qq.com/kf/kfcbf8f8d07ac7215f?enc_scene=ENCGFSDF567DF&scene_param=a%3D1%26b%3D2
|
||||
* {@code 如 https://work.weixin.qq.com/kf/kfcbf8f8d07ac7215f?enc_scene=ENCGFSDF567DF&scene_param=a%3D1%26b%3D2}
|
||||
* 2. 历史调用接口返回的客服链接(包含encScene=XXX参数),不支持scene_param参数。
|
||||
* 3. 返回的客服链接,不能修改或复制参数到其他链接使用。否则进入会话事件参数校验不通过,导致无法回调。
|
||||
*/
|
||||
|
||||
@@ -5,8 +5,9 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 生成异步上传任务
|
||||
*
|
||||
* @author <a href="https://github.com/imyzt">imyzt</a>
|
||||
* @date 2025/04/27
|
||||
* @since 2025/04/27
|
||||
*/
|
||||
@Data
|
||||
public class MediaUploadByUrlReq {
|
||||
|
||||
@@ -10,8 +10,9 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 异步上传企微素材
|
||||
*
|
||||
* @author <a href="https://github.com/imyzt">imyzt</a>
|
||||
* @date 2025/4/27
|
||||
* @since 2025/4/27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
|
||||
@@ -85,13 +85,13 @@ public class WxCpLinkedCorpMessage implements Serializable {
|
||||
/**
|
||||
* <pre>
|
||||
* 请使用.
|
||||
* {@link LinkedCorpMsgType#TEXT}
|
||||
* {@link LinkedCorpMsgType#IMAGE}
|
||||
* {@link LinkedCorpMsgType#VIDEO}
|
||||
* {@link LinkedCorpMsgType#NEWS}
|
||||
* {@link LinkedCorpMsgType#MPNEWS}
|
||||
* {@link LinkedCorpMsgType#MARKDOWN}
|
||||
* {@link LinkedCorpMsgType#MINIPROGRAM_NOTICE}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#TEXT}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#IMAGE}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#VIDEO}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#NEWS}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#MPNEWS}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#MARKDOWN}
|
||||
* {@link me.chanjar.weixin.cp.constant.WxCpConsts.LinkedCorpMsgType#MINIPROGRAM_NOTICE}
|
||||
* </pre>
|
||||
*
|
||||
* @param msgType 消息类型
|
||||
|
||||
@@ -68,19 +68,19 @@ public class WxCpXmlMessage 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}
|
||||
* 当发送消息的时候使用:
|
||||
* {@link WxConsts.XmlMsgType#TEXT}
|
||||
* {@link WxConsts.XmlMsgType#IMAGE}
|
||||
* {@link WxConsts.XmlMsgType#VOICE}
|
||||
* {@link WxConsts.XmlMsgType#VIDEO}
|
||||
* {@link WxConsts.XmlMsgType#NEWS}
|
||||
* {@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}
|
||||
* </pre>
|
||||
*/
|
||||
@XStreamAlias("MsgType")
|
||||
|
||||
@@ -12,7 +12,8 @@ import java.util.List;
|
||||
* 用法: WxCustomMessage m = WxCustomMessage.TEMPLATECARD().title(...)....toUser(...).build();
|
||||
* </pre>
|
||||
*
|
||||
* @author yzts</ a> created on 2019-05-16
|
||||
* @author yzts
|
||||
* @since 2019-05-16
|
||||
*/
|
||||
public class TemplateCardBuilder extends BaseBuilder<TemplateCardBuilder> {
|
||||
/**
|
||||
|
||||
@@ -10,8 +10,8 @@ import java.util.List;
|
||||
* 打卡规则基础信息
|
||||
*
|
||||
* @author zhongjun96
|
||||
* @date 2023/7/7
|
||||
**/
|
||||
* @since 2023/7/7
|
||||
*/
|
||||
@Data
|
||||
public class WxCpCheckinGroupBase implements Serializable {
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ public class WxCpOaSchedule implements Serializable, ToJson {
|
||||
/**
|
||||
* 提醒时间与日程开始时间(start_time)的差值,当is_remind为1时有效。例如:-300表示日程开始前5分钟提醒。
|
||||
* 特殊情况:企业微信终端设置的“全天”类型的日程,由于start_time是0点时间戳,提醒如果设置了当天9点,则会出现正数32400。
|
||||
* <br/>
|
||||
* <br>
|
||||
* 取值范围:-604800 ~ 86399
|
||||
*/
|
||||
@SerializedName("remind_time_diffs")
|
||||
|
||||
@@ -39,7 +39,7 @@ public class WxCpOaMeetingRoomBookResult extends WxCpBaseResp implements Seriali
|
||||
private String schedule_id;
|
||||
/**
|
||||
* 通过会议预定会议室 和 通过日程预定会议室 接口返回
|
||||
* <br/>
|
||||
* <br>
|
||||
* 会议室冲突日期列表,为当天0点的时间戳;使用重复会议预定会议室,部分日期与会议室预定情况冲突时返回
|
||||
*/
|
||||
@SerializedName("conflict_date")
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @date 2025/1/16 09:40
|
||||
* @since 2025/1/16 09:40
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTips {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @date 2025/1/16 09:42
|
||||
* @since 2025/1/16 09:42
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTipsContent {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @date 2025/1/16 09:45
|
||||
* @since 2025/1/16 09:45
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTipsSubText {
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @date 2025/1/16 09:46
|
||||
* @since 2025/1/16 09:46
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTipsSubTextContent {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @date 2025/1/16 09:49
|
||||
* @since 2025/1/16 09:49
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTipsSubTextContentLink {
|
||||
|
||||
@@ -3,9 +3,9 @@ package me.chanjar.weixin.cp.bean.oa.templatedata;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @date 2025/1/16 09:47
|
||||
* @version 1.0
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @since 2025/1/16 09:47
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTipsSubTextContentPlainText {
|
||||
|
||||
@@ -6,9 +6,9 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author mrsiu@msn.com
|
||||
* @date 2025/1/16 09:43
|
||||
* @version 1.0
|
||||
* @author mrsiu@msn.com
|
||||
* @version 1.0
|
||||
* @since 2025/1/16 09:43
|
||||
*/
|
||||
@Data
|
||||
public class TemplateTipsText {
|
||||
|
||||
@@ -31,8 +31,8 @@ public interface WxCpCorpGroupConfigStorage {
|
||||
/**
|
||||
* Update corp access token.
|
||||
*
|
||||
* @param corpId
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @param corpAccessToken the corp access token
|
||||
* @param expiresInSeconds the expires in seconds
|
||||
*/
|
||||
@@ -41,8 +41,8 @@ public interface WxCpCorpGroupConfigStorage {
|
||||
/**
|
||||
* 授权企业的access token相关
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @return the access token
|
||||
*/
|
||||
String getCorpAccessToken(String corpId, Integer agentId);
|
||||
@@ -50,8 +50,8 @@ public interface WxCpCorpGroupConfigStorage {
|
||||
/**
|
||||
* Gets access token entity.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @return the access token entity
|
||||
*/
|
||||
WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId);
|
||||
@@ -59,8 +59,8 @@ public interface WxCpCorpGroupConfigStorage {
|
||||
/**
|
||||
* Is access token expired boolean.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @return the boolean
|
||||
*/
|
||||
boolean isCorpAccessTokenExpired(String corpId, Integer agentId);
|
||||
@@ -68,8 +68,8 @@ public interface WxCpCorpGroupConfigStorage {
|
||||
/**
|
||||
* Expire access token.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
*/
|
||||
void expireCorpAccessToken(String corpId, Integer agentId);
|
||||
|
||||
@@ -118,7 +118,8 @@ public interface WxCpCorpGroupConfigStorage {
|
||||
/**
|
||||
* Gets access token lock.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @return the access token lock
|
||||
*/
|
||||
Lock getCorpAccessTokenLock(String corpId, Integer agentId);
|
||||
|
||||
@@ -133,7 +133,7 @@ public interface WxCpTpConfigStorage {
|
||||
String getEncodingAESKey();
|
||||
|
||||
/**
|
||||
* 企微服务商企业ID & 企业secret
|
||||
* {@code 企微服务商企业ID & 企业secret}
|
||||
*
|
||||
* @return the corp id
|
||||
*/
|
||||
|
||||
@@ -187,7 +187,9 @@ public abstract class AbstractWxCpTpInRedisConfigImpl extends WxCpTpDefaultConfi
|
||||
|
||||
|
||||
/**
|
||||
* 企微服务商企业ID & 企业secret, 来自于企微配置
|
||||
* {@code 企微服务商企业ID & 企业secret, 来自于企微配置}
|
||||
*
|
||||
* @return 企业ID
|
||||
*/
|
||||
@Override
|
||||
public String getCorpId() {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class WxCpTpDefaultConfigImpl implements WxCpTpConfigStorage, Serializabl
|
||||
private final transient Map<String, Lock> authCorpJsapiTicketLocker = new ConcurrentHashMap<>();
|
||||
private final transient Map<String, Lock> authSuiteJsapiTicketLocker = new ConcurrentHashMap<>();
|
||||
/**
|
||||
* 企微服务商企业ID & 企业secret,来自于企微配置
|
||||
* {@code 企微服务商企业ID & 企业secret,来自于企微配置}
|
||||
*/
|
||||
protected volatile String corpId;
|
||||
/**
|
||||
@@ -198,7 +198,7 @@ public class WxCpTpDefaultConfigImpl implements WxCpTpConfigStorage, Serializabl
|
||||
/**
|
||||
* Sets suite id.
|
||||
*
|
||||
* @param suiteId
|
||||
* @param suiteId 套件ID
|
||||
*/
|
||||
public void setSuiteId(String suiteId) {
|
||||
this.suiteId = suiteId;
|
||||
@@ -211,6 +211,8 @@ public class WxCpTpDefaultConfigImpl implements WxCpTpConfigStorage, Serializabl
|
||||
|
||||
/**
|
||||
* Sets suite secret.
|
||||
*
|
||||
* @param corpSecret 套件密钥
|
||||
*/
|
||||
public void setSuiteSecret(String corpSecret) {
|
||||
this.suiteSecret = corpSecret;
|
||||
|
||||
@@ -124,7 +124,7 @@ public class WxCpConsts {
|
||||
public static final String REOPEN_INACTIVE_AGENT = "reopen_inactive_agent";
|
||||
|
||||
/**
|
||||
* 企业成员添加外部联系人事件推送 & 会话存档客户同意进行聊天内容存档事件回调事件
|
||||
* {@code 企业成员添加外部联系人事件推送 & 会话存档客户同意进行聊天内容存档事件回调事件}
|
||||
*/
|
||||
public static final String CHANGE_EXTERNAL_CONTACT = "change_external_contact";
|
||||
|
||||
|
||||
@@ -33,28 +33,31 @@ public interface WxCpCgService {
|
||||
/**
|
||||
* 授权企业的access token相关
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param businessType
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @param businessType 业务类型
|
||||
* @return the access token
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* Gets access token entity.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param businessType
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @param businessType 业务类型
|
||||
* @param forceRefresh 是否强制刷新
|
||||
* @return the access token entity
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxAccessToken getCorpAccessTokenEntity(String corpId, Integer agentId, Integer businessType, boolean forceRefresh) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* Is access token expired boolean.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
* @return the boolean
|
||||
*/
|
||||
boolean isCorpAccessTokenExpired(String corpId, Integer agentId);
|
||||
@@ -62,8 +65,8 @@ public interface WxCpCgService {
|
||||
/**
|
||||
* Expire access token.
|
||||
*
|
||||
* @param corpId the corp id
|
||||
* @param agentId
|
||||
* @param corpId 企业ID
|
||||
* @param agentId 应用ID
|
||||
*/
|
||||
void expireCorpAccessToken(String corpId, Integer agentId);
|
||||
|
||||
@@ -72,6 +75,7 @@ public interface WxCpCgService {
|
||||
*
|
||||
* @param url 接口地址
|
||||
* @param queryParam 请求参数
|
||||
* @param req 获取token请求参数
|
||||
* @return the string
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -83,6 +87,7 @@ public interface WxCpCgService {
|
||||
* @param url 接口地址
|
||||
* @param queryParam 请求参数
|
||||
* @param withoutCorpAccessToken 请求是否忽略CorpAccessToken 默认不忽略-false
|
||||
* @param req 获取token请求参数
|
||||
* @return the string
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -93,6 +98,7 @@ public interface WxCpCgService {
|
||||
*
|
||||
* @param url 接口地址
|
||||
* @param postData 请求body字符串
|
||||
* @param req 获取token请求参数
|
||||
* @return the string
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -110,6 +116,7 @@ public interface WxCpCgService {
|
||||
* @param executor 执行器
|
||||
* @param uri 请求地址
|
||||
* @param data 参数
|
||||
* @param req 获取token请求参数
|
||||
* @return the t
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -156,7 +163,7 @@ public interface WxCpCgService {
|
||||
/**
|
||||
* 互联企业的服务类对象
|
||||
*
|
||||
* @return
|
||||
* @return 互联企业服务对象
|
||||
*/
|
||||
WxCpLinkedCorpService getLinkedCorpService();
|
||||
|
||||
@@ -164,10 +171,11 @@ public interface WxCpCgService {
|
||||
* 获取下级/下游企业小程序session
|
||||
* https://developer.work.weixin.qq.com/document/path/93355
|
||||
*
|
||||
* @param userId
|
||||
* @param sessionKey
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
* @param userId 用户ID
|
||||
* @param sessionKey 会话密钥
|
||||
* @param req 请求参数
|
||||
* @return 小程序session结果
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, Requ
|
||||
* @param url the url
|
||||
* @param postData the post data
|
||||
* @param withoutCorpAccessToken the without Corp access token
|
||||
* @param req 获取token请求参数
|
||||
* @return the string
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -136,6 +137,7 @@ public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, Requ
|
||||
* @param uri the uri
|
||||
* @param data the data
|
||||
* @param withoutCorpAccessToken the without Corp access token
|
||||
* @param req 获取token请求参数
|
||||
* @return the t
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -181,6 +183,7 @@ public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, Requ
|
||||
* @param executor the executor
|
||||
* @param uri the uri
|
||||
* @param data the data
|
||||
* @param req 获取token请求参数
|
||||
* @return the t
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@@ -197,6 +200,7 @@ public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, Requ
|
||||
* @param uri the uri
|
||||
* @param data the data
|
||||
* @param withoutCorpAccessToken the without Corp access token
|
||||
* @param req 获取token请求参数
|
||||
* @return the t
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface WxCpTpEditionService {
|
||||
* 延长试用期
|
||||
* <p>
|
||||
* <a href='https://developer.work.weixin.qq.com/document/path/91913'>文档地址</a>
|
||||
* <p/>
|
||||
* </p>
|
||||
* 注意:
|
||||
* <ul>
|
||||
* <li>一个应用可以多次延长试用,但是试用总天数不能超过60天</li>
|
||||
|
||||
@@ -20,9 +20,11 @@ public interface WxCpTpIdConvertService {
|
||||
* unionid与external_userid的关联
|
||||
* <a href="https://developer.work.weixin.qq.com/document/path/95900">查看文档</a>
|
||||
*
|
||||
* @param cropId 企业ID
|
||||
* @param unionid 微信客户的unionid
|
||||
* @param openid 微信客户的openid
|
||||
* @param subjectType 程序或公众号的主体类型: 0表示主体名称是企业的,1表示主体名称是服务商的
|
||||
* @return 转换结果
|
||||
* @throws WxErrorException 。
|
||||
*/
|
||||
WxCpTpUnionidToExternalUseridResult unionidToExternalUserid(String cropId, String unionid, String openid,
|
||||
@@ -31,29 +33,33 @@ public interface WxCpTpIdConvertService {
|
||||
|
||||
/**
|
||||
* 将企业主体下的客户标签ID转换成服务商主体下的客户标签ID
|
||||
* @param corpId 企业微信 ID
|
||||
* @param externalTagIdList 企业主体下的客户标签ID列表,最多不超过1000个
|
||||
* @return 客户标签转换结果
|
||||
*
|
||||
* @param corpId 企业微信 ID
|
||||
* @param externalTagIdList 企业主体下的客户标签ID列表,最多不超过1000个
|
||||
* @return 客户标签转换结果
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpTpTagIdListConvertResult externalTagId(String corpId, String... externalTagIdList) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 将企业主体下的微信客服ID转换成服务商主体下的微信客服ID
|
||||
* @param corpId 企业微信 ID
|
||||
* @param openKfIdList 微信客服ID列表,最多不超过1000个
|
||||
* @return 微信客服ID转换结果
|
||||
* @throws WxErrorException .
|
||||
*
|
||||
* @param corpId 企业微信 ID
|
||||
* @param openKfIdList 微信客服ID列表,最多不超过1000个
|
||||
* @return 微信客服ID转换结果
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpTpOpenKfIdConvertResult ConvertOpenKfId (String corpId, String... openKfIdList ) throws WxErrorException;
|
||||
WxCpTpOpenKfIdConvertResult ConvertOpenKfId(String corpId, String... openKfIdList) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 将应用获取的外部用户临时idtmp_external_userid,转换为external_userid
|
||||
* @param corpId 企业微信Id
|
||||
* @param businessType 业务类型。1-会议 2-收集表
|
||||
* @param userType 转换的目标用户类型。1-客户 2-企业互联 3-上下游 4-互联企业(圈子)
|
||||
* @param tmpExternalUserIdList 外部用户临时id,最多不超过100个
|
||||
* @return 转换成功的结果列表
|
||||
*
|
||||
* @param corpId 企业微信Id
|
||||
* @param businessType 业务类型。1-会议 2-收集表
|
||||
* @param userType 转换的目标用户类型。1-客户 2-企业互联 3-上下游 4-互联企业(圈子)
|
||||
* @param tmpExternalUserIdList 外部用户临时id,最多不超过100个
|
||||
* @return 转换成功的结果列表
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpTpConvertTmpExternalUserIdResult convertTmpExternalUserId(String corpId, int businessType, int userType, String... tmpExternalUserIdList) throws WxErrorException;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,7 @@ public interface WxCpTpOAService {
|
||||
String copyTemplate(@NonNull String openTemplateId, String corpId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取审批申请详情
|
||||
* 获取审批申请详情
|
||||
*
|
||||
* @param spNo 审批单编号。
|
||||
* @param corpId the corp id
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface WxCpTpOrderService {
|
||||
* 获取订单详情
|
||||
* <p>
|
||||
* <a href='https://developer.work.weixin.qq.com/document/15219#%E8%8E%B7%E5%8F%96%E8%AE%A2%E5%8D%95%E8%AF%A6%E6%83%85'>文档地址</a>
|
||||
* <p/>
|
||||
* </p>
|
||||
*
|
||||
* @param orderId 订单号
|
||||
* @return the order
|
||||
@@ -31,7 +31,7 @@ public interface WxCpTpOrderService {
|
||||
* 获取订单列表
|
||||
* <p>
|
||||
* <a href='https://developer.work.weixin.qq.com/document/15219#%E8%8E%B7%E5%8F%96%E8%AE%A2%E5%8D%95%E5%88%97%E8%A1%A8'>文档地址</a>
|
||||
* <p/>
|
||||
* </p>
|
||||
*
|
||||
* @param startTime 起始时间
|
||||
* @param endTime 终止时间
|
||||
|
||||
@@ -199,7 +199,7 @@ public interface WxCpTpService {
|
||||
* @return permanent code info
|
||||
* @throws WxErrorException the wx error exception
|
||||
* @author yuan
|
||||
* @since 2020 -03-18
|
||||
* @since 2020-03-18
|
||||
*/
|
||||
WxCpTpPermanentCodeInfo getPermanentCodeInfo(String authCode) throws WxErrorException;
|
||||
|
||||
@@ -227,7 +227,7 @@ public interface WxCpTpService {
|
||||
* @param authType 授权类型:0 正式授权, 1 测试授权。
|
||||
* @return pre auth url
|
||||
* @throws WxErrorException the wx error exception
|
||||
* @link https ://work.weixin.qq.com/api/doc/90001/90143/90602
|
||||
* @see <a href="https://work.weixin.qq.com/api/doc/90001/90143/90602">文档地址</a>
|
||||
*/
|
||||
String getPreAuthUrl(String redirectUri, String state, int authType) throws WxErrorException;
|
||||
|
||||
@@ -558,12 +558,12 @@ public interface WxCpTpService {
|
||||
WxCpTpAppQrcode getAppQrcode(String suiteId, String appId, String state, Integer style, Integer resultType) throws WxErrorException ;
|
||||
|
||||
/**
|
||||
*
|
||||
* 明文corpid转换为加密corpid 为更好地保护企业与用户的数据,第三方应用获取的corpid不再是明文的corpid,将升级为第三方服务商级别的加密corpid。<a href="https://developer.work.weixin.qq.com/document/path/95327">文档说明</a>
|
||||
* 第三方可以将已有的明文corpid转换为第三方的加密corpid。
|
||||
* @param corpId
|
||||
* @return
|
||||
* @throws WxErrorException
|
||||
*
|
||||
* @param corpId 企业ID
|
||||
* @return 加密的企业ID
|
||||
* @throws WxErrorException 微信错误异常
|
||||
*/
|
||||
WxCpTpCorpId2OpenCorpId corpId2OpenCorpId(String corpId) throws WxErrorException;
|
||||
|
||||
@@ -655,6 +655,8 @@ public interface WxCpTpService {
|
||||
|
||||
/**
|
||||
* 构造第三方应用oauth2链接
|
||||
*
|
||||
* @return OAuth2服务
|
||||
*/
|
||||
WxCpTpOAuth2Service getWxCpTpOAuth2Service();
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
* </pre>
|
||||
*
|
||||
* @author zhangq <zhangq002@gmail.com>
|
||||
* @since 2021 -02-14 16:02
|
||||
* @since 2021-02-14 16:02
|
||||
*/
|
||||
public interface WxCpTpTagService {
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,7 @@ public class WxCpTpEditionServiceImpl implements WxCpTpEditionService {
|
||||
* 延长试用期
|
||||
* <p>
|
||||
* <a href='https://developer.work.weixin.qq.com/document/path/91913'>文档地址</a>
|
||||
* <p/>
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>一个应用可以多次延长试用,但是试用总天数不能超过60天</li>
|
||||
* <li>仅限时试用或试用过期状态下的应用可以延长试用期</li>
|
||||
|
||||
@@ -30,7 +30,7 @@ public class WxCpTpOrderServiceImpl implements WxCpTpOrderService {
|
||||
* 获取订单详情
|
||||
* <p>
|
||||
* <a href='https://developer.work.weixin.qq.com/document/15219#%E8%8E%B7%E5%8F%96%E8%AE%A2%E5%8D%95%E8%AF%A6%E6%83%85'>文档地址</a>
|
||||
* <p/>
|
||||
* </p>
|
||||
*
|
||||
* @param orderId 订单号
|
||||
* @return the order
|
||||
@@ -49,7 +49,7 @@ public class WxCpTpOrderServiceImpl implements WxCpTpOrderService {
|
||||
* 获取订单列表
|
||||
* <p>
|
||||
* <a href='https://developer.work.weixin.qq.com/document/15219#%E8%8E%B7%E5%8F%96%E8%AE%A2%E5%8D%95%E5%88%97%E8%A1%A8'>文档地址</a>
|
||||
* <p/>
|
||||
* </p>
|
||||
*
|
||||
* @param startTime 起始时间
|
||||
* @param endTime 终止时间
|
||||
|
||||
@@ -25,7 +25,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tag.*;
|
||||
* </pre>
|
||||
*
|
||||
* @author zhangq <zhangq002@gmail.com>
|
||||
* @since 2021 -02-14 16:02
|
||||
* @since 2021-02-14 16:02
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class WxCpTpTagServiceImpl implements WxCpTpTagService {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class XStreamTransformer {
|
||||
protected static final Map<Class<?>, XStream> CLASS_2_XSTREAM_INSTANCE = configXStreamInstance();
|
||||
|
||||
/**
|
||||
* xml -> pojo
|
||||
* {@code xml -> pojo}
|
||||
*
|
||||
* @param <T> the type parameter
|
||||
* @param clazz the clazz
|
||||
@@ -58,7 +58,7 @@ public class XStreamTransformer {
|
||||
}
|
||||
|
||||
/**
|
||||
* pojo -> xml.
|
||||
* {@code pojo -> xml.}
|
||||
*
|
||||
* @param <T> the type parameter
|
||||
* @param clazz the clazz
|
||||
|
||||
@@ -13,6 +13,11 @@ import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||
*/
|
||||
public interface WxMaConfig {
|
||||
|
||||
/**
|
||||
* 设置更新access_token之前的回调
|
||||
*
|
||||
* @param updateAccessTokenBefore 回调函数
|
||||
*/
|
||||
default void setUpdateAccessTokenBefore(Consumer<WxAccessTokenEntity> updateAccessTokenBefore) {}
|
||||
|
||||
/**
|
||||
@@ -23,8 +28,18 @@ public interface WxMaConfig {
|
||||
String getAccessToken();
|
||||
|
||||
// region 稳定版access token
|
||||
/**
|
||||
* 是否使用稳定版access_token
|
||||
*
|
||||
* @return 是否使用稳定版access_token
|
||||
*/
|
||||
boolean isStableAccessToken();
|
||||
|
||||
/**
|
||||
* 设置是否使用稳定版access_token
|
||||
*
|
||||
* @param useStableAccessToken 是否使用稳定版access_token
|
||||
*/
|
||||
void useStableAccessToken(boolean useStableAccessToken);
|
||||
|
||||
// endregion
|
||||
@@ -65,6 +80,12 @@ public interface WxMaConfig {
|
||||
*/
|
||||
void updateAccessToken(String accessToken, int expiresInSeconds);
|
||||
|
||||
/**
|
||||
* 更新access_token处理器
|
||||
*
|
||||
* @param accessToken 新的 access_token 值
|
||||
* @param expiresInSeconds 过期时间,单位:秒
|
||||
*/
|
||||
default void updateAccessTokenProcessor(String accessToken, int expiresInSeconds) {
|
||||
WxAccessTokenEntity wxAccessTokenEntity = new WxAccessTokenEntity();
|
||||
wxAccessTokenEntity.setAppid(getAppid());
|
||||
@@ -74,6 +95,11 @@ public interface WxMaConfig {
|
||||
updateAccessToken(accessToken, expiresInSeconds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新access_token之前的回调
|
||||
*
|
||||
* @param wxAccessTokenEntity access_token实体
|
||||
*/
|
||||
default void updateAccessTokenBefore(WxAccessTokenEntity wxAccessTokenEntity) {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,6 +36,7 @@ public class WxMaCryptUtils extends me.chanjar.weixin.common.util.crypto.WxCrypt
|
||||
* @param sessionKey session_key
|
||||
* @param encryptedData 消息密文
|
||||
* @param ivStr iv字符串
|
||||
* @return 解密后的字符串
|
||||
*/
|
||||
public static String decrypt(String sessionKey, String encryptedData, String ivStr) {
|
||||
try {
|
||||
@@ -58,6 +59,7 @@ public class WxMaCryptUtils extends me.chanjar.weixin.common.util.crypto.WxCrypt
|
||||
* @param sessionKey session_key
|
||||
* @param encryptedData 消息密文
|
||||
* @param ivStr iv字符串
|
||||
* @return 解密后的字符串
|
||||
*/
|
||||
public static String decryptAnotherWay(String sessionKey, String encryptedData, String ivStr) {
|
||||
byte[] keyBytes = Base64.decodeBase64(sessionKey.getBytes(UTF_8));
|
||||
|
||||
@@ -24,7 +24,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) {
|
||||
@@ -32,6 +37,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);
|
||||
@@ -39,7 +52,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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user