Browse Source

#1494

update
tags/v1.22.2.2^2
Gitea 3 years ago
parent
commit
4f44b1ca9f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      routers/authentication/wechat_event.go

+ 3
- 1
routers/authentication/wechat_event.go View File

@@ -45,7 +45,7 @@ func AcceptWechatEvent(ctx *context.Context) {
we := WechatEvent{}
xml.Unmarshal(b, &we)

log.Info("accept wechat event= %v", we)
log.Info("accept wechat event= %+v", we)
key := redis_key.WechatBindingUserIdKey(we.EventKey)
val, _ := redis_client.Get(key)
if val == "" {
@@ -53,6 +53,8 @@ func AcceptWechatEvent(ctx *context.Context) {
ctx.XML(200, "")
return
}
//todo 已绑定微信号的如何处理?
//todo 取消关注事件记得过滤
userId, _ := strconv.ParseInt(val, 10, 64)
//更新微信openId和流水
wechat.BindWechat(userId, we.EventKey)


Loading…
Cancel
Save