From 802490657dad33b04cfac7e766098cd19c27daf3 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Fri, 10 Feb 2023 14:56:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_randlist.go | 12 ------------ modules/user/module.go | 5 ----- 2 files changed, 17 deletions(-) diff --git a/modules/friend/api_cross_randlist.go b/modules/friend/api_cross_randlist.go index 75df806a1..c0d022d2a 100644 --- a/modules/friend/api_cross_randlist.go +++ b/modules/friend/api_cross_randlist.go @@ -31,10 +31,6 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR return } - this.moduleFriend.Debug("在线玩家数", - log.Field{Key: "uid", Value: session.GetUserId()}, - log.Field{Key: "count", Value: len(cuList)}) - recommend := 5 //推荐数量 //过滤 var newList []*pb.CacheUser @@ -64,10 +60,6 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR } newList = append(newList, v) } - this.moduleFriend.Debug("过滤后的玩家数", - log.Field{Key: "uid", Value: session.GetUserId()}, - log.Field{Key: "count", Value: len(newList)}) - var randOnlineUsers []string if len(newList) > recommend { randArr := utils.RandomNumbers(0, len(newList), recommend) @@ -83,10 +75,6 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR } } } - this.moduleFriend.Debug("过滤有效的UID", - log.Field{Key: "uid", Value: session.GetUserId()}, - log.Field{Key: "count", Value: len(randOnlineUsers)}) - var userList []*pb.FriendBase for _, uid := range randOnlineUsers { diff --git a/modules/user/module.go b/modules/user/module.go index 913207e17..4b23a682f 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -106,7 +106,6 @@ func (this *User) GetUser(uid string) (user *pb.DBUser) { this.Errorln("查询远程玩家信息", err) return nil } - this.Debug("查询远程玩家信息", log.Field{Key: "uid", Value: uid}, log.Field{Key: "user", Value: user}) } else { user = this.modelUser.GetUser(uid) } @@ -132,7 +131,6 @@ func (this *User) getRemoteUser(uid string) (*pb.DBUser, error) { this.Errorln("getRemoteUser", err) return nil, err } - this.Debug("远程用户", log.Field{Key: "uid", Value: uid}, log.Field{Key: "user", Value: reply}) return reply, nil } @@ -553,18 +551,15 @@ func (this *User) getUserFromRemoteDb(uid string, rsp *pb.DBUser) error { if !ok { return errors.New("sid split error") } - this.Debug("getUserFromRemoteDb", log.Field{Key: "uid", Value: uid}, log.Field{Key: "sid", Value: sid}) conn, err := db.ServerDBConn(sid) if err != nil { return err } model := db.NewDBModel(comm.TableUser, 0, conn) - if err := model.Get(uid, rsp); err != nil { this.Errorln("Get User:", err) return err } - this.Debug("Get", log.Field{Key: "rsp",Value: rsp}) return nil }