|
|
@@ -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) |
|
|
|