This commit is contained in:
苏尹岚
2020-11-12 16:59:06 +08:00
parent d37e8e8b4f
commit bdb7c8a3f3
2 changed files with 4 additions and 1 deletions

View File

@@ -262,6 +262,9 @@ func (c *User2Controller) UpdateUserByMiniInfo() {
if userInfo.PurePhoneNumber != "" {
user.Mobile = utils.String2Pointer(userInfo.PurePhoneNumber)
}
if userInfo.NickName != "" {
user.Name = userInfo.NickName
}
_, err = dao.UpdateEntity(dao.GetDB(), user)
if err != nil && dao.IsDuplicateError(err) {
if mobileAuth, err2 := auth2.LoginInternal(params.Ctx.Context, auth2.AuthTypeMobile, userInfo.PurePhoneNumber, auth2.UserIDMobile, auth2.InternalAuthSecret); err2 == nil {