fix: 修复订阅消息发送逻辑
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user