修改问题
This commit is contained in:
parent
e5300bc59c
commit
359b676e95
|
|
@ -273,6 +273,11 @@ public class PlayGameBLL : CloudGamingBase
|
|||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gameInfoCache.PlayGameHeartbeat($",游戏免费游玩");
|
||||
await gameInfoCache.SaveChangesAsync(this);
|
||||
}
|
||||
return playGameHeartbeatResponse;
|
||||
|
||||
}
|
||||
|
|
@ -482,13 +487,13 @@ public class PlayGameBLL : CloudGamingBase
|
|||
/// </summary>
|
||||
/// <param name="sn"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<BaseResponse<object>> GetMyScList(string sn)
|
||||
public async Task<BaseResponse<dynamic>> GetMyScList(string sn)
|
||||
{
|
||||
var requestParmat = new JYRequestParameter(sn, _UserId);
|
||||
var response = await JYApi.MyScList(requestParmat);
|
||||
if (response.IsSuccess)
|
||||
{
|
||||
return new BaseResponse<object>(ResponseCode.Success, "", response.Data) { };
|
||||
return new BaseResponse<dynamic>(ResponseCode.Success, "", response.Data) { };
|
||||
}
|
||||
throw response.ToMessageBox();
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ namespace CloudGaming.Code.Game
|
|||
/// </summary>
|
||||
/// <param name="playGameUserInfo"></param>
|
||||
/// <returns></returns>
|
||||
public static bool PlayGameHeartbeat(this PlayGameUserInfo playGameUserInfo)
|
||||
public static bool PlayGameHeartbeat(this PlayGameUserInfo playGameUserInfo, string desc = "")
|
||||
{
|
||||
if (playGameUserInfo.GameStatus != PlayGameStatus.游戏中)
|
||||
{
|
||||
|
|
@ -214,6 +214,11 @@ namespace CloudGaming.Code.Game
|
|||
}
|
||||
playGameUserInfo.PlayGameHeartbeatAt = DateTime.Now;
|
||||
playGameUserInfo.PlayGameTotalSeconds = (int)(playGameUserInfo.PlayGameHeartbeatAt ?? DateTime.Now).Subtract(playGameUserInfo.PlayGameStartAt ?? playGameUserInfo.CreateDateTime).TotalSeconds;
|
||||
playGameUserInfo.GameUserOperation.Add(new PlayGameUserOperation()
|
||||
{
|
||||
OperationDateTime = DateTime.Now,
|
||||
Content = $"用户持续游戏中,累计游玩时间{(playGameUserInfo.PlayGameTotalSeconds / 60).ToString("0.##")}{desc};",
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -320,6 +325,11 @@ namespace CloudGaming.Code.Game
|
|||
/// <returns></returns>
|
||||
public static bool PlayGameUserNotAction(this PlayGameUserInfo playGameUserInfo)
|
||||
{
|
||||
if (playGameUserInfo.GameStatus == PlayGameStatus.开始游戏)
|
||||
{
|
||||
//说明一次都没有使用过游戏心跳
|
||||
|
||||
}
|
||||
if (playGameUserInfo.GameStatus != PlayGameStatus.游戏掉线)
|
||||
{
|
||||
playGameUserInfo.GameStatus = PlayGameStatus.游戏掉线;
|
||||
|
|
@ -355,7 +365,7 @@ namespace CloudGaming.Code.Game
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// 游戏掉线
|
||||
/// 游戏游戏重连
|
||||
/// </summary>
|
||||
/// <param name="playGameUserInfo"></param>
|
||||
/// <returns></returns>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user