修改新用户
This commit is contained in:
parent
67385797e5
commit
b5954efc8f
@ -149,7 +149,7 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
|
|||||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype7, 1)
|
this.module.ModuleRtask.SendToRtask(session, comm.Rtype7, 1)
|
||||||
|
|
||||||
// 检查特权 并发送每日邮件
|
// 检查特权 并发送每日邮件
|
||||||
this.module.ModulePrivilege.QueryPrivilege(session)
|
// this.module.ModulePrivilege.QueryPrivilege(session)
|
||||||
//推送登录公告
|
//推送登录公告
|
||||||
if this.module.modelUser.isLoginFirst(lastLoginTime) {
|
if this.module.modelUser.isLoginFirst(lastLoginTime) {
|
||||||
this.chat.SendSysChatToUser(session, comm.ChatSystem2, 0, 0)
|
this.chat.SendSysChatToUser(session, comm.ChatSystem2, 0, 0)
|
||||||
|
@ -61,7 +61,6 @@ func (this *ModelUser) NickNameIsExist(name string) bool {
|
|||||||
if err == mongo.ErrNoDocuments { //无记录
|
if err == mongo.ErrNoDocuments { //无记录
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -76,7 +75,13 @@ func (this *ModelUser) User_Create(user *pb.DBUser) (err error) {
|
|||||||
user.Lv = 1 //初始等级
|
user.Lv = 1 //初始等级
|
||||||
user.Ctime = now
|
user.Ctime = now
|
||||||
user.Logintime = now
|
user.Logintime = now
|
||||||
return this.Add(user.Uid, user)
|
_, err = this.DB.InsertOne(comm.TableUser, user)
|
||||||
|
key := fmt.Sprintf("%s:%s", this.TableName, user.Uid)
|
||||||
|
if err = this.Redis.HMSet(key, user); err != nil {
|
||||||
|
this.module.Error("创建用户", log.Fields{"sid": user.Sid, "account": user.Binduid})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取用户
|
//获取用户
|
||||||
|
Loading…
Reference in New Issue
Block a user