mirror of
https://gitee.com/yudaocode/yudao-boot-mini.git
synced 2026-10-06 14:13:14 +08:00
fix(mp): 修复公众号关注时 48001 错误码兜底失效
将微信异常错误码与 WxMpErrorMsgEnum.CODE_48001.getCode() 比较, 避免 int 与枚举实例比较导致个人订阅号无接口权限场景无法创建粉丝信息。 对应 https://t.zsxq.com/xy7I6
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ public class SubscribeHandler implements WxMpMessageHandler {
|
||||
} catch (WxErrorException e) {
|
||||
log.error("[handle][粉丝({})] 获取粉丝信息失败!", wxMessage.getFromUser(), e);
|
||||
// 特殊情况(个人账号,无接口权限):https://t.zsxq.com/cLFq5
|
||||
if (ObjUtil.equal(e.getError().getErrorCode(), WxMpErrorMsgEnum.CODE_48001)) {
|
||||
if (ObjUtil.equal(e.getError().getErrorCode(), WxMpErrorMsgEnum.CODE_48001.getCode())) {
|
||||
wxMpUser = new WxMpUser();
|
||||
wxMpUser.setOpenId(wxMessage.getFromUser());
|
||||
wxMpUser.setSubscribe(true);
|
||||
|
||||
Reference in New Issue
Block a user