Skip to content

Commit

Permalink
fix: sort
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Aug 3, 2022
1 parent 87d204f commit f40a321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion GZCTF/Repositories/GameRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ private static IEnumerable<ScoreboardItem> GenScoreboardItems(Data[] data, IDict
};
}).ToList()
},
LastSubmissionTime = j.Select(s => s.Submission?.SubmitTimeUTC ?? DateTimeOffset.UtcNow),
LastSubmissionTime = j.Select(s => s.Submission?.SubmitTimeUTC ?? DateTimeOffset.UtcNow)
.OrderByDescending(t => t).FirstOrDefault()
}).OrderByDescending(j => j.Item.Score) //成绩倒序,最后提交时间正序
.ThenBy(j => j.LastSubmissionTime)
.Select((j, i) =>
Expand Down
2 changes: 1 addition & 1 deletion GZCTF/Utils/LogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static Logger GetLogger(IConfiguration configuration, IServiceProvider se
restrictedToMinimumLevel: LogEventLevel.Debug,
rollOnFileSizeLimit: true,
retainedFileCountLimit: 5,
hooks: new ArchiveHooks(CompressionLevel.Optimal, "log/archive/{UtcDate:yyyy-MM}/{UtcDate:yyyy-MM-dd}")
hooks: new ArchiveHooks(CompressionLevel.Optimal, "log/archive/{UtcDate:yyyy-MM}")
))
.WriteTo.Async(t => t.PostgreSQL(
connectionString: configuration.GetConnectionString("DefaultConnection"),
Expand Down

0 comments on commit f40a321

Please sign in to comment.