fix(mp): 修复公众号关注时 48001 错误码兜底失效

将微信异常错误码与 WxMpErrorMsgEnum.CODE_48001.getCode() 比较,
避免 int 与枚举实例比较导致个人订阅号无接口权限场景无法创建粉丝信息。

对应 https://t.zsxq.com/xy7I6
This commit is contained in:
YunaiV
2026-06-26 19:38:48 -07:00
parent 10a40f21fa
commit a25dd36be6
@@ -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);