|
@@ -88,7 +88,7 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
gimUserId, err := db2.UserInsert(db.ImDb, &model2.User{ |
|
|
|
|
|
|
|
|
_, err = db2.UserInsert(db.ImDb, &model2.User{ |
|
|
PhoneNumber: strconv.FormatInt(msg.Phone, 10), |
|
|
PhoneNumber: strconv.FormatInt(msg.Phone, 10), |
|
|
Nickname: user.Nickname, |
|
|
Nickname: user.Nickname, |
|
|
AvatarUrl: userProfile.AvatarUrl, |
|
|
AvatarUrl: userProfile.AvatarUrl, |
|
@@ -102,8 +102,8 @@ func handleDouShenUserRegisterConsumeForOfficial(msgData []byte) error { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{ |
|
|
gimUser, err := db2.UserGetOneByParams(db.ImDb, msg.MasterId, map[string]interface{}{ |
|
|
"key": "id", |
|
|
|
|
|
"value": gimUserId, |
|
|
|
|
|
|
|
|
"key": "phone_number", |
|
|
|
|
|
"value": msg.Phone, |
|
|
}) |
|
|
}) |
|
|
if gimUser == nil { |
|
|
if gimUser == nil { |
|
|
return errors.New("用户暂未注册im系统") |
|
|
return errors.New("用户暂未注册im系统") |
|
|