mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-29 01:18:36 +08:00
🎨 优化重构部分代码,抽取公共常量
This commit is contained in:
@ -1,14 +1,30 @@
|
||||
package me.chanjar.weixin.common.api;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static me.chanjar.weixin.common.error.WxMpErrorMsgEnum.*;
|
||||
|
||||
/**
|
||||
* 微信开发所使用到的常量类.
|
||||
*
|
||||
* @author Daniel Qian & binarywang
|
||||
*/
|
||||
public class WxConsts {
|
||||
/**
|
||||
* access_token 相关错误代码
|
||||
* <pre>
|
||||
* 发生以下情况时尝试刷新access_token
|
||||
* 40001 获取access_token时AppSecret错误,或者access_token无效
|
||||
* 42001 access_token超时
|
||||
* 40014 不合法的access_token,请开发者认真比对access_token的有效性(如是否过期),或查看是否正在为恰当的公众号调用接口
|
||||
* </pre>
|
||||
*/
|
||||
public static final List<Integer> ACCESS_TOKEN_ERROR_CODES = Arrays.asList(CODE_40001.getCode(),
|
||||
CODE_40014.getCode(), CODE_42001.getCode());
|
||||
|
||||
/**
|
||||
* 微信推送过来的消息的类型,和发送给微信xml格式消息的消息类型.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user