修改问题
This commit is contained in:
parent
4861ae081a
commit
51a0a044eb
|
|
@ -63,15 +63,13 @@ builder.Services.AddControllers(options =>
|
|||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen(c =>
|
||||
{
|
||||
|
||||
|
||||
string description = "";
|
||||
var filePath = Path.GetFullPath(".versionDescribe");
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
description = File.ReadAllText(filePath);
|
||||
}
|
||||
c.SwaggerDoc("v1", new OpenApiInfo { Title = "蒸汽云游戏扩展付", Version = "0.0.1", Description = description });
|
||||
c.SwaggerDoc("v1", new OpenApiInfo { Title = "蒸汽云游戏扩展", Version = "0.0.1", Description = description });
|
||||
foreach (var assemblies in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
// 添加 XML 注释文件路径
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class PlayGameProcessor(IServiceProvider serviceProvider) : ThreadProcess
|
|||
|
||||
//用户排队掉线人
|
||||
var userPlayGameNotQueueEndGame = gameInfoList
|
||||
.Where(it => it.GameStatus == PlayGameStatus.游戏掉线 && it.PlayGameHeartbeatAt < userNotQueueEnd)
|
||||
.Where(it => it.GameStatus == PlayGameStatus.排队掉线 && it.LastPlayQueueAt < userNotQueueEnd)
|
||||
.ToList();
|
||||
if (userPlayGameNotQueueEndGame.Count > 0)
|
||||
foreach (var user in userPlayGameNotQueueEndGame)
|
||||
|
|
@ -117,7 +117,7 @@ public class PlayGameProcessor(IServiceProvider serviceProvider) : ThreadProcess
|
|||
}
|
||||
|
||||
var userPlayGameNotQueue = gameInfoList
|
||||
.Where(it => it.GameStatus == PlayGameStatus.排队中 && it.LastDateTime < userNotQueue)
|
||||
.Where(it => it.GameStatus == PlayGameStatus.排队中 && it.LastPlayQueueAt < userNotQueue)
|
||||
.ToList();
|
||||
if (userPlayGameNotQueue.Count > 0)
|
||||
foreach (var user in userPlayGameNotQueue)
|
||||
|
|
@ -125,6 +125,8 @@ public class PlayGameProcessor(IServiceProvider serviceProvider) : ThreadProcess
|
|||
user.PlayGameUserNotQueue();
|
||||
await user.SaveChangesAsync(dao, redis).ConfigureAwait(false);
|
||||
}
|
||||
//状态统计
|
||||
var gameStatusStatistics = gameInfoList.GroupBy(it => it.GameStatus).ToDictionary(it => it.Key, it => it.Count());// .Select(it => new { GameStatus = it.Key, GameCount = it.Count() }).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user