|
@@ -208,8 +208,7 @@ func RefreshToken(code string) (token string, isBindMobile int, err error) {
|
|
|
|
|
|
//判断unionid是否存在
|
|
|
wxUser, unionErr := userService.GetTemplateUserByUnionId(wechatInfo.UnionId)
|
|
|
-
|
|
|
- if unionErr == nil {
|
|
|
+ if unionErr != nil {
|
|
|
if unionErr == gorm.ErrRecordNotFound { //注册用户
|
|
|
isRegister = true
|
|
|
} else {
|
|
@@ -342,7 +341,7 @@ func BindWxGzh(code string) (err error) {
|
|
|
//判断unionid是否存在
|
|
|
wxUser, unionErr := userService.GetTemplateUserByUnionId(unionId)
|
|
|
|
|
|
- if unionErr == nil {
|
|
|
+ if unionErr != nil {
|
|
|
if unionErr == gorm.ErrRecordNotFound { //注册用户
|
|
|
isRegister = true
|
|
|
} else {
|