This commit is contained in:
meixiongfeng 2023-11-23 16:42:32 +08:00
commit 889cb45d13
2 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,7 @@ func (this *apiComp) Upgrade(session comm.IUserSession, req *pb.IsLandUpgradeReq
this.module.model.Change(session.GetUserId(), map[string]interface{}{ this.module.model.Change(session.GetUserId(), map[string]interface{}{
"nodes": info.Nodes, "nodes": info.Nodes,
}) })
session.SendMsg(string(this.module.GetType()), "upgrade", &pb.IsLandUpgradeReq{Nid: conf.NodeId}) session.SendMsg(string(this.module.GetType()), "upgrade", &pb.IsLandUpgradeResp{Nid: conf.NodeId, Lv: info.Nodes[conf.NodeId]})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "IsLandUpgradeReq", conf.CostItem) this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "IsLandUpgradeReq", conf.CostItem)
}) })

View File

@ -169,6 +169,10 @@ func (this *WTask) OpenCmdNotice(session comm.IUserSession, keys ...string) {
break break
} }
} }
if !ok {
return
}
if user, err = this.ModuleUser.GetUser(session.GetUserId()); err != nil { if user, err = this.ModuleUser.GetUser(session.GetUserId()); err != nil {
this.Error("获取用户信息失败!", log.Field{Key: "uid", Value: session.GetUserId()}) this.Error("获取用户信息失败!", log.Field{Key: "uid", Value: session.GetUserId()})
return return