1
0
mirror of synced 2026-02-05 00:57:50 +08:00

🎨 批量修复部分javadoc里的错误标签或不规范代码

This commit is contained in:
Binary Wang
2026-01-06 16:51:30 +08:00
parent 37c2db9672
commit 51d2ed7a3c
112 changed files with 751 additions and 419 deletions

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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字节且不能含有\\:*?”< >|等字符"),
/**

View File

@@ -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

View File

@@ -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, "法人&企业信息一致性校验中"),

View File

@@ -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 当中存在不合法的queryquery格式遵循URL标准即k1=v1&k2=v2 invalid query
* {@code paegs 当中存在不合法的queryquery格式遵循URL标准即k1=v1&k2=v2 invalid query}
*/
CODE_40212(40212, "paegs 当中存在不合法的queryquery格式遵循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"),

View File

@@ -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

View File

@@ -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);

View File

@@ -25,6 +25,7 @@ public class SignUtils {
*
* @param message 签名数据
* @param key 签名密钥
* @return 签名结果
*/
public static String createHmacSha256Sign(String message, String key) {
try {

View File

@@ -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)) {

View File

@@ -197,6 +197,7 @@ public class WxCryptUtil {
/**
* 对明文进行加密.
*
* @param randomStr 随机字符串
* @param plainText 需要加密的明文
* @return 加密后base64编码的字符串
*/

View File

@@ -10,8 +10,9 @@ import java.io.Serializable;
/**
* 输入流数据.
* <p/>
* <p>
* InputStreamData
* </p>
*
* @author zichuan.zhou91@gmail.com
* created on 2022/2/15

View File

@@ -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);
}

View File

@@ -43,6 +43,11 @@ public class WxGsonBuilder {
});
}
/**
* 创建Gson实例
*
* @return Gson实例
*/
public static Gson create() {
if (Objects.isNull(GSON_INSTANCE)) {
synchronized (INSTANCE) {

View File

@@ -22,6 +22,11 @@ public class XStreamInitializer {
public static ClassLoader classLoader;
/**
* 设置类加载器
*
* @param classLoaderInfo 类加载器
*/
public static void setClassLoader(ClassLoader classLoaderInfo) {
classLoader = classLoaderInfo;
}