websotckty

This commit is contained in:
苏尹岚
2020-11-13 09:53:21 +08:00
parent 80392c74d5
commit aab7167e35
2 changed files with 8 additions and 3 deletions

View File

@@ -99,6 +99,9 @@ func (c *EventController) TestWebsocket() {
}
clientUser[userID] = ws
for _, v := range messageGroups {
if len(clients[v.GroupID]) > 0 {
}
clients[v.GroupID] = clientUser
}
db := dao.GetDB()

View File

@@ -10,6 +10,7 @@ import (
"git.rosy.net.cn/jx-callback/business/jxutils/jsonerr"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego"
)
@@ -262,9 +263,10 @@ func (c *User2Controller) UpdateUserByMiniInfo() {
if userInfo.PurePhoneNumber != "" {
user.Mobile = utils.String2Pointer(userInfo.PurePhoneNumber)
}
// if userInfo.NickName != "" {
// user.Name = userInfo.NickName
// }
if userInfo.NickName != "" {
user.Name = userInfo.NickName
}
globals.SugarLogger.Debugf("UpdateUserByMiniInfo", utils.Format4Output(userInfo, false))
_, 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 {