年兽排行榜统计

This commit is contained in:
by 2025-01-07 00:24:25 +08:00
parent 56bfab6cbe
commit 6a712e5b19
2 changed files with 4 additions and 4 deletions

View File

@ -80,7 +80,7 @@ func (svc *RankNianSvc) LuckFind(args *model.FindNianListArgs, ret *model.FindNi
return RankNianColError
}
err := fc.Find(bson.M{}).Sort("-luck").Limit(40).All(&ret.List)
err := fc.Find(bson.M{"luck": bson.M{"$gt": 0}}).Sort("-luck").Limit(40).All(&ret.List)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
logger.Logger.Error("QueryMatchSeason is err: ", err)
return err
@ -95,7 +95,7 @@ func (svc *RankNianSvc) DamageFind(args *model.FindNianListArgs, ret *model.Find
return RankNianColError
}
err := fc.Find(bson.M{}).Sort("-damage").Limit(40).All(&ret.List)
err := fc.Find(bson.M{"damage": bson.M{"$gt": 0}}).Sort("-damage").Limit(40).All(&ret.List)
if err != nil && !errors.Is(err, mgo.ErrNotFound) {
logger.Logger.Error("QueryMatchSeason is err: ", err)
return err

View File

@ -1034,6 +1034,7 @@ func (r *RankMatchMgr) NianRankAward() {
log.RankData = append(log.RankData, rankData)
rankId += 1
}
mq.Write(log)
//清除幸运榜数值
err := model.ClearNianRank(&model.FindNianListArgs{
Platform: platform,
@ -1041,7 +1042,6 @@ func (r *RankMatchMgr) NianRankAward() {
if err != nil {
logger.Logger.Errorf("清除幸运榜数值失败 err:%v", err)
}
mq.Write(log)
})).StartByExecutor("NianLuck_Award")
} else if info.TypeId == 2 {
@ -1117,6 +1117,7 @@ func (r *RankMatchMgr) NianRankAward() {
log.RankData = append(log.RankData, rankData)
rankId += 1
}
mq.Write(log)
//删除数据库数据
err := model.DelNianRank(&model.FindNianListArgs{
Platform: platform,
@ -1124,7 +1125,6 @@ func (r *RankMatchMgr) NianRankAward() {
if err != nil {
logger.Logger.Errorf("删除年兽排行榜数据库数据 err:%v", err)
}
mq.Write(log)
})).StartByExecutor("NianDamage_Award")
}
}