fix: 修复订阅消息发送逻辑

This commit is contained in:
Blizzard
2026-03-30 14:31:19 +08:00
parent b17d233cd5
commit ae0020aa71
3 changed files with 4 additions and 121 deletions
+3 -3
View File
@@ -107,10 +107,10 @@ func SendCareMsg() error {
}
if smr.Errcode != 0 {
global.Logger.Error("订阅消息发送失败!" + userId + "open-id" + user.MiniOpenId)
return fmt.Errorf("微信服务器返回错误: errcode=%d, errmsg=%s", smr.Errcode, smr.Errmsg)
global.Logger.Error(fmt.Sprintf("订阅消息发送失败! userId: %s, openId: %s, errcode: %d, errmsg: %s", userId, user.MiniOpenId, smr.Errcode, smr.Errmsg))
continue // 不要因为某个用户失败(如43101没配额)而中断整个发送流程
}
global.Logger.Info("订阅消息发送成功!" + userId + "open-id" + user.MiniOpenId)
global.Logger.Info(fmt.Sprintf("订阅消息发送成功! userId: %s, openId: %s", userId, user.MiniOpenId))
}
}
}