using CloudGaming.Repository.Game.Entities.App; namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App; /// /// 游戏配置 服务 T_GameCBTService /// public class T_GameCBTService(IServiceProvider serviceProvider) : ApplicationUserService(serviceProvider) { /// /// 获取列表数据 /// /// /// public async override Task FindListAsync(PagingSearchInput pagingSearchInput) { var query = this.Repository.Select //游戏Id .WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.GameId), w => w.GameId.Contains(pagingSearchInput.Search.GameId ?? "")) //游戏名称 .WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.GameName), w => w.GameName.Contains(pagingSearchInput.Search.GameName ?? "")) .OrderByDescending(w => w.Id) .Select(w => new { w.Id, w.GameId, w.GameBgImgId, w.ImageIconId, w.IsOnline, w.Score, w.OrderId, w.UpdateTime, w.CreateTime, w.Desc, w.GameLoadBgImageId, w.ImageId_YXK, w.IsTest, w.IsLimitToVip, w.GameLoadTime, w.ImageId_TJ, w.ImageId_ShouSuo, w.ImageId_RM, w.Title2, w.GameName, w.ImageId_FK, w.ImageId_Banner, w.ConsumeDiamondNumHour, w.ConsumeDiamondNumHourVip, w.GameGroup, w.VipTypeLimit, w.VipVisible, w.IsDiscount, w.OnlinePlatform, w.FriendlyTips, w.TenantId, }) ; var result = await Repository.AsPagingViewAsync(query, pagingSearchInput); // 设置列 //result.GetColumn(query, w => w.OperatorName).SetColumn("操作人"); //result.GetColumn(query, w => w. !).SetColumn(w => w.Name!); result .FormatValue(query, w => w.UpdateTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd")) .FormatValue(query, w => w.CreateTime, (oldValue) => oldValue?.ToString("yyyy-MM-dd")) ; return result; } }