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