Browse Source

修改微信关注查询用户unionid为空的问题

renzheng 9 years ago
parent
commit
8b98a3aa67
1 changed files with 1 additions and 1 deletions
  1. 1 1
      weixin/src/qfw/weixin/dao/userdao.go

+ 1 - 1
weixin/src/qfw/weixin/dao/userdao.go

@@ -92,7 +92,7 @@ func AddUser(openid, unionid, bindweixin, userphoto string) (err error, flag int
 	} else {
 		log.Println("update user:", userphoto)
 		//已经注册过
-		Update("user", M{"s_unionid": unionid, "i_type": 3}, `{"$set":{"s_m_openid":"`+openid+`","s_avatar":"`+userphoto+`"}}`, true, false)
+		Update("user", M{"s_m_openid": openid}, `{"$set":{"s_avatar":"`+userphoto+`"}}`, true, false)
 		return errors.New("该微信号已经注册过"), 0
 	}
 }