删除日志
This commit is contained in:
parent
d54401a3fe
commit
802490657d
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user