修改问题
This commit is contained in:
parent
a2d4a58b6b
commit
8f835754e3
|
|
@ -391,7 +391,8 @@ namespace CloudGaming.Code.Account
|
|||
{
|
||||
userInfoDto.IdCard = userInfoDto.IdCard.Substring(0, 4) + "*********" + userInfoDto.IdCard.Substring(userInfoDto.IdCard.Length - 4);
|
||||
}
|
||||
var userPlayGameTime = Dao.DaoPhone.Context.T_User_PlayGameTime.Where(it => it.UserId == _UserId).SumAsync(it => (int?)it.PlayTime);
|
||||
//var userPlayGameTime = await Dao.DaoPhone.Context.T_User_PlayGameTime.Where(it => it.UserId == _UserId).SumAsync(it => (int?)it.PlayTime);
|
||||
//userInfoDto.UserPlayGameTime = userPlayGameTime ?? 0;
|
||||
return userInfoDto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -157,8 +157,9 @@ namespace CloudGaming.Code.Account
|
|||
{
|
||||
throw MessageBox.Show(ResponseCode.NotFoundRecord, "未找到用户扩展信息");
|
||||
}
|
||||
|
||||
userInfo.LoadUserInfo(user, userData, userCurrency);
|
||||
var userPlayGameTime = await Dao.DaoPhone.Context.T_User_PlayGameTime.Where(it => it.UserId == userId).SumAsync(it => (int?)it.PlayTime);
|
||||
userInfo.UserPlayGameTime = userPlayGameTime ?? 0;
|
||||
await cloudGamingBase.RedisCache.StringSetAsync(key, userInfo, TimeSpan.FromHours(1));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ namespace CloudGaming.Code.Account
|
|||
if (issuccess)
|
||||
{
|
||||
cloudGamingBase.UserInfo.Diamond = (int)currency.CurrencyMoney;
|
||||
await cloudGamingBase.SaveUserInfoCacheChangesAsync();
|
||||
//await cloudGamingBase.SaveUserInfoCacheChangesAsync();
|
||||
UserCurrencyConsumeType consumeType = money >= 0 ? UserCurrencyConsumeType.收入 : UserCurrencyConsumeType.消耗;
|
||||
T_User_DiamondList userDiamondList = null;
|
||||
if (diamondListId > 0)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using CloudGaming.Code.Account;
|
||||
using CloudGaming.Code.AppExtend;
|
||||
using CloudGaming.Code.Contract;
|
||||
using CloudGaming.DtoModel.Account.User;
|
||||
using CloudGaming.DtoModel.Game;
|
||||
|
|
@ -254,6 +255,10 @@ public class PlayGameBLL : CloudGamingBase
|
|||
{
|
||||
throw MessageBox.ErrorShow("扣款出现错误");
|
||||
}
|
||||
//userInfo
|
||||
//var userPlayGameTime = await Dao.DaoPhone.Context.T_User_PlayGameTime.Where(it => it.UserId == userId).SumAsync(it => (int?)it.PlayTime);
|
||||
userInfo.UserPlayGameTime += minutes;
|
||||
await this.SaveUserInfoCacheChangesAsync();
|
||||
gameInfoCache.CurrencyLogId = currlogId;
|
||||
gameInfoCache.DiamondListId = diamId;
|
||||
//修改最后扣费时间
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ public class UserInfo
|
|||
/// </summary>
|
||||
|
||||
public UserInfoNightCard NightCard { get; set; } = new UserInfoNightCard();
|
||||
|
||||
/// <summary>
|
||||
/// 用户游玩时间,分钟
|
||||
/// </summary>
|
||||
public int UserPlayGameTime { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user