using CloudGaming.Repository.Game.Entities.App; namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App; /// /// 通用奖励配置表 服务 T_RewardConfigService /// public class T_RewardConfigService(IServiceProvider serviceProvider) : ApplicationUserService(serviceProvider) { /// /// 获取列表数据 /// /// /// public async override Task FindListAsync(PagingSearchInput pagingSearchInput) { var query = this.Repository.Select .OrderByDescending(w => w.Id) .Select(w => new { w.Id, w.CurrencyType, w.AwardNum, w.ParentNodeType, w.ParentNodeId, 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!); return result; } /// /// 获取列表数据 /// /// /// public async Task> FindListAsync(int typeId, int productId) { var query = await this.Repository.SelectNoTracking.Where(it => it.ParentNodeType == typeId && it.ParentNodeId == productId).OrderByDescending(w => w.Id).ToListAsync(); return query; } /// /// 保存数据 /// /// /// public virtual Task SaveFormAsync(T_RewardConfig form) { return Repository.InsertOrUpdateAsync(form ?? throw MessageBox.Show("保存函数参数Dto不是数据库类型,请对保存函数重写!")); } }