diff --git a/modules/sociaty/model_sociatyboss.go b/modules/sociaty/model_sociatyboss.go index c86bbce6c..32dc213d0 100644 --- a/modules/sociaty/model_sociatyboss.go +++ b/modules/sociaty/model_sociatyboss.go @@ -455,10 +455,6 @@ func (s *ModelSociatyBoss) resetSportsData() error { var record []*pb.DBSociatyBossRecord _ = s.GetList(uid, &record) for _, v := range record { - // update := map[string]interface{}{ - // "status": 1, //归档 - // "tasks": []*pb.ChallengeTask{}, - // } if err := s.DelByUId(uid); err != nil { s.moduleSociaty.Error("清理玩家赛季记录", log.Field{Key: "uid", Value: v.Uid}, log.Field{Key: "err", Value: err.Error()}) } @@ -555,11 +551,10 @@ func (s *ModelSociatyBoss) settlement() error { s.addSociatyRank(uid, total) s.moduleSociaty.Debug("结算:", log.Field{Key: "uid", Value: uid}) - //归档赛季记录 - if err := s.AddList(comm.RDS_EMPTY, uid, cr); err != nil { - s.moduleSociaty.Error("归档玩家赛季数据", log.Field{Key: "err", Value: err.Error()}) - } + } + //归档前10的玩家记录 + return nil } diff --git a/modules/user/module.go b/modules/user/module.go index 509bb2457..b51b4d983 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -180,13 +180,24 @@ func (this *User) UserOnlineList() ([]*pb.CacheUser, error) { // 跨服玩家列表 func (this *User) CrossUserOnlineList() ([]*pb.CacheUser, error) { - reply := &pb.UserOnlineResp{} - err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), - comm.Service_Worker, Rpc_GetAllOnlineUser, nil, reply) + conn, err := db.Local() if err != nil { return nil, err } - return reply.Users, err + model := db.NewDBModel(comm.TableSession, 0, conn) + var cache []*pb.CacheUser + if err := model.GetList(comm.RDS_EMPTY, &cache); err != nil { + return nil, err + } + return cache, nil + + // reply := &pb.UserOnlineResp{} + // err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), + // comm.Service_Worker, Rpc_GetAllOnlineUser, nil, reply) + // if err != nil { + // return nil, err + // } + // return reply.Users, err } // 跨服玩家会话