提交代码
This commit is contained in:
parent
0817ab1300
commit
c3142e048b
|
|
@ -236,9 +236,9 @@ namespace CloudGaming.Code.Account
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 注册新用户或更新现有用户信息
|
||||
/// 注册新用户或更新现有用户信息
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="account"></param>
|
||||
/// <param name="ip"></param>
|
||||
/// <returns></returns>
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ namespace CloudGaming.Code.Monitor
|
|||
userStatistics.Add(channel, statisticsUser);
|
||||
}
|
||||
statisticsUser.PlayGameCount = playGameCount;
|
||||
statisticsUser.PlayGameTimeCount = playGameTimeCount > 0 ? playGameTimeCount / 60 / 60 : playGameTimeCount;
|
||||
statisticsUser.PlayGameTimeCount = (decimal)(playGameTimeCount > 0 ? playGameTimeCount / 60.0 : playGameTimeCount);
|
||||
statisticsUser.StartGameCount = startGameCount;
|
||||
statisticsUser.UpdatedAt = DateTime.Now;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ public class MonitorBLL : CloudGamingBase
|
|||
loginAll.Value += _loginCount;
|
||||
registrAll.Value += _registrCount;
|
||||
gameAll.Value += _playGameCount;
|
||||
gameTimeAll.Value += _playGameTimeCount;
|
||||
gameTimeAll.Value += Math.Round(_playGameTimeCount, 2);
|
||||
userLogin.Add(GetStatisticsDto(curr, channel.Name, _loginCount));
|
||||
userRegistr.Add(GetStatisticsDto(curr, channel.Name, _registrCount));
|
||||
playGame.Add(GetStatisticsDto(curr, channel.Name, _playGameCount));
|
||||
|
|
@ -176,13 +176,13 @@ public class MonitorBLL : CloudGamingBase
|
|||
return new { Login = userLogin, Registr = userRegistr, PlayGame = playGame, PlayTimeGame = playTimeGame };
|
||||
|
||||
}
|
||||
private StatisticsDto GetStatisticsDto(DateTime curr, string channelId, int count)
|
||||
private StatisticsDto GetStatisticsDto(DateTime curr, string channelId, decimal count)
|
||||
{
|
||||
return new StatisticsDto()
|
||||
{
|
||||
Category = channelId,
|
||||
TimeStamp = curr.ToString("dd-HH"),
|
||||
Value = count
|
||||
Value = Math.Round(count, 2)
|
||||
};
|
||||
}
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace CloudGaming.DtoModel.Other;
|
|||
public class StatisticsDto
|
||||
{
|
||||
public string TimeStamp { get; set; }
|
||||
public int Value { get; set; }
|
||||
public decimal Value { get; set; }
|
||||
public string Category { get; set; }
|
||||
|
||||
public StatisticsDto() { }
|
||||
|
|
|
|||
|
|
@ -285,7 +285,9 @@ public partial class CloudGamingCBTContext : DbContext
|
|||
entity.Property(e => e.LoginDay).HasComment("天");
|
||||
entity.Property(e => e.LoginHour).HasComment("精确到小时");
|
||||
entity.Property(e => e.PlayGameCount).HasComment("用户玩游戏人数");
|
||||
entity.Property(e => e.PlayGameTimeCount).HasComment("用户玩游戏时长");
|
||||
entity.Property(e => e.PlayGameTimeCount)
|
||||
.HasComment("用户玩游戏时长")
|
||||
.HasColumnType("decimal(18, 0)");
|
||||
entity.Property(e => e.StartGameCount).HasComment("启动游戏次数");
|
||||
entity.Property(e => e.UpdatedAt)
|
||||
.HasComment("修改时间")
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public partial class T_Statistics_GameHour
|
|||
/// <summary>
|
||||
/// 用户玩游戏时长
|
||||
/// </summary>
|
||||
public virtual int PlayGameTimeCount { get; set; }
|
||||
public virtual decimal PlayGameTimeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户玩游戏人数
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user