diff --git a/src/CloudGaming/Code/CloudGaming.Code/AppExtend/CustomResultFilter.cs b/src/CloudGaming/Code/CloudGaming.Code/AppExtend/CustomResultFilter.cs index 58e4cee..4a6b25e 100644 --- a/src/CloudGaming/Code/CloudGaming.Code/AppExtend/CustomResultFilter.cs +++ b/src/CloudGaming/Code/CloudGaming.Code/AppExtend/CustomResultFilter.cs @@ -54,39 +54,7 @@ namespace CloudGaming.Code.AppExtend var dic = value.ToDictionaryOrList(); objectResult.Value = dic; - //if (objectResult.Value is IEnumerable enumerable) - //{ - // var list = objectResult.Value.ToListDictionary(5); - // BaseResponse>> baseResponse = new BaseResponse>>(ResonseCode.Success, "", list); - // objectResult.Value = baseResponse; - // return; - //} - //var dic = objectResult.Value.ToDictionary(5); - //var t = objectResult.Value.GetType(); - //if (!t.FullName.Contains("HuanMeng.DotNetCore.Base.BaseResponse")) - //{ - // BaseResponse> baseResponse = new BaseResponse>(ResonseCode.Success, "", dic); - // objectResult.Value = baseResponse; - //} - //else - //{ - // objectResult.Value = dic; - //} - //objectResult.Value.to - - //FindImagesAttributes(objectResult.Value); - //// var responseObject = objectResult.Value; - //// var membersWithImagesAttribute = responseObject.GetType() - ////.GetMembers(BindingFlags.Public | BindingFlags.Instance) - ////.Where(m => m.GetCustomAttribute() != null); - //// foreach (var member in membersWithImagesAttribute) - //// { - //// var imagesAttribute = member.GetCustomAttribute(); - //// Console.WriteLine($"带有 [Images] 特性的成员:{member.Name}"); - //// Console.WriteLine($"FieldName 属性值:{imagesAttribute?.FieldName}"); - //// } - //// 递归处理返回对象的所有属性并打印路径 - //ProcessObjectProperties(objectResult.Value, user, language, path); + } } diff --git a/src/CloudGaming/Code/CloudGaming.Code/Cache/CloudGamingCache.cs b/src/CloudGaming/Code/CloudGaming.Code/Cache/CloudGamingCache.cs index 8f9f802..ddc7b4d 100644 --- a/src/CloudGaming/Code/CloudGaming.Code/Cache/CloudGamingCache.cs +++ b/src/CloudGaming/Code/CloudGaming.Code/Cache/CloudGamingCache.cs @@ -1,3 +1,8 @@ +using AutoMapper; + +using CloudGaming.Code.Cache.Special; +using CloudGaming.DtoModel.Game; + using HuanMeng.DotNetCore.CacheHelper; using System.Collections.Concurrent; @@ -65,8 +70,39 @@ namespace CloudGaming.Code.Cache public List EpgCategoryCfg => GetCacheList(ref _epgCategoryCfg, it => it.IsOnline); #endregion + + public GameEntityCache? gameEntityCache; + + /// + /// 游戏缓存 + /// + public GameEntityCache GameEntityCache + { + get + { + if (gameEntityCache == null) + { + gameEntityCache = new GameEntityCache(_gamingBase.Dao, _gamingBase.RedisCache, _gamingBase.Mapper, _gamingBase.AppConfig); + } + return gameEntityCache; + } + } + /// + /// 游戏列表 + /// + public List GameInfos + { + get + { + + return GameEntityCache?.DataList ?? new List(); + } + } + #region 首页缓存表 + + //private CommonDataEntityCache? _gameList; ///// diff --git a/src/CloudGaming/Code/CloudGaming.Code/Cache/Special/GameEntityCache.cs b/src/CloudGaming/Code/CloudGaming.Code/Cache/Special/GameEntityCache.cs new file mode 100644 index 0000000..9e04edd --- /dev/null +++ b/src/CloudGaming/Code/CloudGaming.Code/Cache/Special/GameEntityCache.cs @@ -0,0 +1,195 @@ +using AutoMapper; + +using CloudGaming.Code.DataAccess; +using CloudGaming.DtoModel.Game; +using CloudGaming.GameModel.Db.Db_Game; + +using HuanMeng.DotNetCore.CacheHelper; +using HuanMeng.DotNetCore.Redis; + +using Newtonsoft.Json; + +using Org.BouncyCastle.Utilities.Collections; + +using StackExchange.Redis; + +using System.Collections.Generic; +using System.Linq; + +namespace CloudGaming.Code.Cache.Special +{ + /// + /// 游戏缓存表 + /// + public class GameEntityCache(DAO dao, IDatabase database, IMapper mapper, AppConfig appConfig) : CommonDataEntityCache(GameEntityCache.GameEntityCacheLock, 60 * 60 * 24 * 7) + { + public static object GameEntityCacheLock; + + public override string key => $"{appConfig.Identifier}:game:gameInfo"; + + public string locaKey => $"{appConfig.Identifier}:lock:gameInfo"; + + public override List GetDataList() + { + var gameCbtList = dao.DaoPhone.Context.T_GameCBT.AsNoTracking().Where(it => it.IsOnline).ToList() ?? new List(); + var gameListDict = dao.DaoGame.Context.T_Game_List.AsNoTracking().ToDictionary(g => g.GameId); + var gameChildList = dao.DaoGame.Context.T_Game_ChildList.AsNoTracking().ToList(); + + var gameTypesDict = dao.DaoGame.Context.T_Game_Types.AsNoTracking().ToDictionary(type => type.TypeId); + var gameTagsDict = dao.DaoGame.Context.T_Game_Tags.AsNoTracking().ToDictionary(tag => tag.TagId); + + var gameInfos = gameCbtList + .Where(gameCbt => gameListDict.ContainsKey(gameCbt.GameId)) + .Select(gameCbt => + { + var game = gameListDict[gameCbt.GameId]; + var gameInfo = mapper.Map(gameCbt); + game.ToGameInfo(gameInfo); + gameInfo.GameType = GetGameExtendedAttributes(gameChildList, gameCbt.GameId, 1, gameTypesDict); + gameInfo.GameTags = GetGameExtendedAttributes(gameChildList, gameCbt.GameId, 2, gameTagsDict); + return gameInfo; + }) + .ToList(); + + return gameInfos; + } + + /// + /// + /// + public override List DataList + { + get + { + start: + if (_dataList != null) return _dataList; + + var tempDataList = MemoryCacheHelper.GetCache>(key); + if (tempDataList != null) + { + _dataList = tempDataList; + return _dataList; + } + + long hashLength = database.HashLength(key); + if (hashLength > 0) + { + var hashEntries = database.HashGetAll(key); + var list = hashEntries + .Where(entry => !string.IsNullOrEmpty(entry.Value)) + .Select(entry => JsonConvert.DeserializeObject(entry.Value)) + .ToList(); + + MemoryCacheHelper.SetCache(key, list, 10); + _dataList = list; + return _dataList; + } + + if (!database.StringSetLock(locaKey, "1", 5)) + { + goto start; + } + + tempDataList ??= GetDataList(); + var serializedGameInfos = tempDataList + .Select(info => new HashEntry($"gameInfo:{info.GameId}", JsonConvert.SerializeObject(info))) + .ToArray(); + database.HashSet(key, serializedGameInfos); + + MemoryCacheHelper.SetCache(key, tempDataList, 60 * 60); + _dataList = tempDataList; + database.KeyDelete(locaKey); + return _dataList; + } + } + + private Dictionary gameInfoDic; + /// + /// 游戏详情 + /// + public Dictionary GameInfoDic + { + get + { + if (gameInfoDic == null) + { + gameInfoDic = DataList.ToDictionary(it => it.GameId); + } + return gameInfoDic; + } + } + + /// + /// 获取游戏详情 + /// + /// + /// + public GameInfo? this[string? gameId] + { + get + { + if (string.IsNullOrEmpty(gameId)) + { + return null; + } + return GameInfoDic[gameId] ?? null; + } + } + + private List GetGameExtendedAttributes( + List gameChildList, + string gameId, + int childType, + Dictionary dictionary) where T : class + { + return gameChildList + .Where(it => it.GameId == gameId && it.ChildType == childType && (it.ChildId ?? 0) > 0) + .OrderBy(it => it.OrderId) + .Select(it => + { + dictionary.TryGetValue(it.ChildId.Value, out var item); + return item switch + { + T_Game_Types type => new GameExtendedAttribute + { + Id = type.TypeId, + Name = type.TypeName, + OrderId = it.OrderId + }, + T_Game_Tags tag => new GameExtendedAttribute + { + Id = tag.TagId, + Name = tag.TagName, + OrderId = it.OrderId + }, + _ => new GameExtendedAttribute() + }; + }) + .Where(attr => attr.Id > 0) + .ToList(); + } + + public override bool ClearData() + { + lock (GameEntityCacheLock) + { + database.KeyDelete(key); + MemoryCacheHelper.DelCache(key); + _dataList = null; + gameInfoDic = null; + } + return true; + } + + public override void ReloadData() + { + lock (lockObj) + { + database.KeyDelete(key); + MemoryCacheHelper.DelCache(key); + _dataList = null; + var x = DataList; + } + } + } +} diff --git a/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgBLL.cs b/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgBLL.cs index 4bab5bb..dcd8d67 100644 --- a/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgBLL.cs +++ b/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgBLL.cs @@ -41,30 +41,22 @@ namespace CloudGaming.Code.Epg { var list = new List() { - + //STEAMCLOUD }; - if (it.IdName == EpgEnum.EpgCatIdName.banner滚动栏) + var epgList = GetEpgList(it.Id); + epgList?.ForEach(item => { - var epgList = GetEpgList(it.Id); - epgList.ForEach(item => + //如果首页展示数量小于集合数量,则退出 + if (it.ShowNumIndex < list.Count) { - if (item.ResType == (int)EpgEnum.EpgResType.游戏) - { - - } - EpgInfo epgInfo = new EpgInfo() - { - CornerIcon = item.CornerIconId, - EpgId = item.EpgId, - Pic = item.ImageId, - //GameIconImage = item. - - }; - }); - } - - - + return; + } + var epgInfo = item.ToEpgInfo(Cache.GameEntityCache); + if (epgInfo != null) + { + list.Add(epgInfo); + } + }); if (list.Count > 0) { @@ -108,7 +100,9 @@ namespace CloudGaming.Code.Epg DateTime currentHour = DateTime.Now.Date.AddHours(DateTime.Now.Hour); if (list?.DataList?.Count > 0) { - var dataList = list.DataList.Where(it => it.EpgCategory == epgParentCategoryId && it.StartEnableTime < currentHour && it.EndEnableTime > currentHour).ToList(); + var dataList = list.DataList.Where(it => it.EpgCategory == epgParentCategoryId && + (it.StartEnableTime == null || it.StartEnableTime < currentHour) + && (it.EndEnableTime == null || it.EndEnableTime > currentHour)).ToList(); return dataList; } return null; diff --git a/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgExtend.cs b/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgExtend.cs new file mode 100644 index 0000000..4f7f399 --- /dev/null +++ b/src/CloudGaming/Code/CloudGaming.Code/Epg/EpgExtend.cs @@ -0,0 +1,72 @@ +using CloudGaming.Code.Cache.Special; +using CloudGaming.DtoModel.Epg; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using static CloudGaming.DtoModel.Epg.EpgEnum; + +namespace CloudGaming.Code.Epg +{ + public static class EpgExtend + { + + /// + /// 菜单转化游戏 + /// + /// + /// + /// + public static EpgInfo ToEpgInfo(this T_Epg_Cfg epgCfg, GameEntityCache gameEntityCache) + { + if (epgCfg.ResType == (int)EpgEnum.EpgResType.游戏 && string.IsNullOrEmpty(epgCfg.ResId)) + { + return null; + } + + var epgInfo = new EpgInfo + { + CornerIcon = epgCfg.CornerIconId, + EpgId = epgCfg.Id, + ResId = epgCfg.ResId, + ResType = epgCfg.ResType, + IdName = epgCfg.IdName, + ImageUrl = epgCfg.ImageId, + Title = epgCfg.Title, + SubTitle = epgCfg.Title2 + }; + + if (epgCfg.ResType == (int)EpgEnum.EpgResType.游戏) + { + var gameInfo = gameEntityCache[epgCfg.ResId]; + if (gameInfo == null) + { + return null; + } + + epgInfo.Title ??= gameInfo.GameName; + epgInfo.SubTitle ??= gameInfo.Title2; + + if (epgInfo.ImageUrl == 0 && !string.IsNullOrEmpty(epgCfg.ImageResStyle)) + { + epgInfo.ImageUrl = epgCfg.ImageResStyle switch + { + var style when style == ((int)ImageResStyle.Game尊享推荐_312_420).ToString() => gameInfo.ImageId_ZXTJ, + var style when style == ((int)ImageResStyle.Game推荐位大图_984_520).ToString() => gameInfo.ImageId_TJ, + var style when style == ((int)ImageResStyle.Game游戏库_180_180).ToString() => gameInfo.GameImageId, + var style when style == ((int)ImageResStyle.Game最近推出_360_548).ToString() => gameInfo.ImageId_ZJTC, + var style when style == ((int)ImageResStyle.Game精选推荐_474_300).ToString() => gameInfo.ImageId_JXTJ, + _ => epgInfo.ImageUrl + }; + } + + epgInfo.Score = gameInfo.Score ?? string.Empty; + } + + return epgInfo; + } + } +} diff --git a/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgEnum.cs b/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgEnum.cs index 3b6f58d..3bead89 100644 --- a/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgEnum.cs +++ b/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgEnum.cs @@ -89,41 +89,6 @@ namespace CloudGaming.DtoModel.Epg webH5 = 4 } - - /// - /// 客户端的跳转类型 - /// 示例:holybladeData={"dataType":9,"dataId":"https://moguext.moguyouxi.cn/moguext/ui/bbs/autologin"} - /// - public enum JumpDataType - { - /// - /// dataId=咨询Id - /// - 资讯 = 1, - 攻略 = 2, - 测评 = 3, - 游戏 = 4, - 专题 = 5, - /// - /// 应该不用了 - /// - 活动 = 6, - - /// - /// dataId无 - /// - 钻石加油包 = 7, - /// - /// dataId无 - /// - 会员购买 = 8, - - /// - /// dataId=h5页面完整地址 - /// - 跳转到h5页面 = 9, - } - } } diff --git a/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgInfo.cs b/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgInfo.cs index add9a6e..c6cd066 100644 --- a/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgInfo.cs +++ b/src/CloudGaming/Model/CloudGaming.DtoModel/Epg/EpgInfo.cs @@ -20,7 +20,7 @@ namespace CloudGaming.DtoModel.Epg public int EpgId { get; set; } /// - /// 资源类型:4游戏 + /// 资源类型 /// public int ResType { get; set; } @@ -38,40 +38,26 @@ namespace CloudGaming.DtoModel.Epg /// 展示图片信息,长宽 /// [Images] - public int Pic { get; set; } - /// - /// 展示图片信息,长宽 - /// - [Images] - public int Pic2 { get; set; } - /// - /// 展示图片信息,长宽 - /// - [Images] - public int Pic3 { get; set; } + public int ImageUrl { get; set; } /// - /// 展示游戏Iocn信息,长宽 + /// 角标图片信息 /// [Images] - public int GameIconImage { get; set; } + public int CornerIcon { get; set; } /// /// 标题 /// public string Title { get; set; } /// - /// 标题2 + /// 副标题 /// - public string Title2 { get; set; } + public string SubTitle { get; set; } /// /// 评分,0.0 /// public string Score { get; set; } - /// - /// 角标图片信息 - /// - [Images] - public int CornerIcon { get; set; } + } } diff --git a/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameExtendedAttribute.cs b/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameExtendedAttribute.cs new file mode 100644 index 0000000..4e44484 --- /dev/null +++ b/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameExtendedAttribute.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CloudGaming.DtoModel.Game +{ + /// + /// + /// + public class GameExtendedAttribute + { + /// + /// 类型Id + /// + public virtual int Id { get; set; } + + /// + /// 类型名称 + /// + public virtual string Name { get; set; } + + /// + /// 排序 + /// + public int OrderId { get; set; } + } +} diff --git a/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameInfo.cs b/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameInfo.cs new file mode 100644 index 0000000..0fc79ed --- /dev/null +++ b/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameInfo.cs @@ -0,0 +1,112 @@ +using AutoMapper; +using AutoMapper.Configuration.Annotations; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CloudGaming.DtoModel.Game +{ + /// + /// 游戏详情 + /// + [AutoMap(typeof(T_GameCBT))] + public class GameInfo : T_GameCBT + { + #region 隐藏成员 + /// + /// 修改时间 + /// + [Ignore] + private new DateTime? UpdateTime { get; set; } + + /// + /// 创建时间 + /// + [Ignore] + private new DateTime? CreateTime { get; set; } + + /// + /// + /// + [Ignore] + public virtual int Id { get; set; } + + /// + /// + /// + [Ignore] + private new Guid TenantId { get; set; } + + #endregion + + /// + /// 游戏标签 + /// + public List GameTags { get; set; } + + /// + /// 游戏列表 + /// + public List GameType { get; set; } + + #region 游戏列表数据 + /// + /// 游戏人数 + /// + public virtual int GamePeopleNum { get; set; } + + /// + /// 是否存档 + /// + public virtual bool GameIsSaveFile { get; set; } + + /// + /// 游戏是否适配 + /// + public virtual bool GameIsAdapter { get; set; } + + + /// + /// 云游戏Id + /// + public virtual string? GameCloudId { get; set; } + + + + /// + /// 游戏介绍 + /// + public virtual string? GameIntroduce { get; set; } + + /// + /// 屏幕方向:0-横屏 1-竖屏 + /// + public virtual int ScreenOrientation { get; set; } + + + /// + /// 是否隐藏鼠标 + /// + public virtual bool GameIsEditionMouse { get; set; } + + /// + /// steam + /// + public virtual string? SteamId { get; set; } + + /// + /// 游戏难度 + /// + public virtual string GameDifficulty { get; set; } + + /// + /// 游戏操作类型 + /// + public virtual string? GameOperationModel { get; set; } + + #endregion + } +} diff --git a/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameInfoExtend.cs b/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameInfoExtend.cs new file mode 100644 index 0000000..719e110 --- /dev/null +++ b/src/CloudGaming/Model/CloudGaming.DtoModel/Game/GameInfoExtend.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CloudGaming.DtoModel.Game +{ + /// + /// 扩展类 + /// + public static class GameInfoExtend + { + /// + /// 转化游戏类 + /// + /// + /// + /// + public static GameInfo ToGameInfo(this T_Game_List gameList, GameInfo? gameInfo = null) + { + if (gameInfo == null) + { + gameInfo = new GameInfo(); + } + if (string.IsNullOrEmpty(gameInfo.GameName)) + { + gameInfo.GameName = gameList.GameName; + } + if (string.IsNullOrEmpty(gameInfo.GameId)) + { + gameInfo.GameId = gameList.GameId; + } + gameInfo.GamePeopleNum = gameList.GamePeopleNum; + gameInfo.GameIsSaveFile = gameList.GameIsSaveFile; + gameInfo.GameIsAdapter = gameList.GameIsAdapter; + gameInfo.GameCloudId = gameList.GameCloudId; + gameInfo.GameIntroduce = gameList.GameIntroduce; + gameInfo.ScreenOrientation = gameList.ScreenOrientation; + gameInfo.GameIsEditionMouse = gameList.GameIsEditionMouse; + gameInfo.SteamId = gameList.SteamId; + gameInfo.GameDifficulty = gameList.GameDifficulty; + gameInfo.GameOperationModel = gameList.GameOperationModel; + return gameInfo; + } + + } +} diff --git a/src/CloudGaming/Model/CloudGaming.DtoModel/MappingProfile.cs b/src/CloudGaming/Model/CloudGaming.DtoModel/MappingProfile.cs new file mode 100644 index 0000000..2e3a73a --- /dev/null +++ b/src/CloudGaming/Model/CloudGaming.DtoModel/MappingProfile.cs @@ -0,0 +1,21 @@ +using AutoMapper; + +using CloudGaming.DtoModel.Game; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CloudGaming.DtoModel; + +public class MappingProfile : Profile +{ + public MappingProfile() + { + // // 创建映射配置 + // CreateMap() + //.ForMember(dest => dest.TypeName, opt => opt.Ignore()); + } +} diff --git a/src/CloudGaming/Model/CloudGaming.GameModel/Db/Db_Game/T_Game_List.cs b/src/CloudGaming/Model/CloudGaming.GameModel/Db/Db_Game/T_Game_List.cs index 5e1e2f0..1bb0f28 100644 --- a/src/CloudGaming/Model/CloudGaming.GameModel/Db/Db_Game/T_Game_List.cs +++ b/src/CloudGaming/Model/CloudGaming.GameModel/Db/Db_Game/T_Game_List.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace CloudGaming.GameModel.Db.Db_Game; diff --git a/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_Epg_Cfg.cs b/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_Epg_Cfg.cs index 07aa1b4..818117f 100644 --- a/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_Epg_Cfg.cs +++ b/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_Epg_Cfg.cs @@ -1,11 +1,11 @@ -using System; +using System; namespace CloudGaming.Model.DbSqlServer.Db_Phone; /// /// Epg配置表 /// -public partial class T_Epg_Cfg: MultiTenantEntity +public partial class T_Epg_Cfg : MultiTenantEntity { public T_Epg_Cfg() { } @@ -124,8 +124,8 @@ public partial class T_Epg_Cfg: MultiTenantEntity /// public virtual DateTime? CreateTime { get; set; } - /// + /// /// 所属租户 /// public override Guid TenantId { get; set; } - } +} diff --git a/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_GameCBT.cs b/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_GameCBT.cs index d66d7f5..f32aa1b 100644 --- a/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_GameCBT.cs +++ b/src/CloudGaming/Model/CloudGaming.Model/DbSqlServer/Db_Phone/T_GameCBT.cs @@ -1,11 +1,11 @@ -using System; +using System; namespace CloudGaming.Model.DbSqlServer.Db_Phone; /// /// 游戏配置 /// -public partial class T_GameCBT: MultiTenantEntity +public partial class T_GameCBT : MultiTenantEntity { public T_GameCBT() { } @@ -156,8 +156,8 @@ public partial class T_GameCBT: MultiTenantEntity /// public virtual string? FriendlyTips { get; set; } - /// + /// /// 所属租户 /// public override Guid TenantId { get; set; } - } +} diff --git a/src/CloudGaming/Utile/HuanMeng.DotNetCore/CacheHelper/CommonDataEntityCache.cs b/src/CloudGaming/Utile/HuanMeng.DotNetCore/CacheHelper/CommonDataEntityCache.cs index 2719b67..84e9f9c 100644 --- a/src/CloudGaming/Utile/HuanMeng.DotNetCore/CacheHelper/CommonDataEntityCache.cs +++ b/src/CloudGaming/Utile/HuanMeng.DotNetCore/CacheHelper/CommonDataEntityCache.cs @@ -75,7 +75,7 @@ namespace HuanMeng.DotNetCore.CacheHelper /// public abstract List GetDataList(); - public bool ClearData() + public virtual bool ClearData() { lock (lockObj) { @@ -85,7 +85,7 @@ namespace HuanMeng.DotNetCore.CacheHelper return true; } - public void ReloadData() + public virtual void ReloadData() { lock (lockObj) {