38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using CloudGaming.Repository.Game.Entities.App;
|
|
namespace CloudGaming.Api.Admin.ApplicationServices.Apps.App;
|
|
|
|
/// <summary>
|
|
/// 弹窗按钮 服务 T_PopupBtnService
|
|
/// </summary>
|
|
public class T_PopupBtnService(IServiceProvider serviceProvider)
|
|
: ApplicationUserService<T_PopupBtn,int,T_PopupBtn,T_PopupBtn>(serviceProvider)
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
/// 获取列表数据
|
|
/// </summary>
|
|
/// <param name="pagingSearchInput"></param>
|
|
/// <returns></returns>
|
|
public async override Task<PagingView> FindListAsync(PagingSearchInput<T_PopupBtn> pagingSearchInput)
|
|
{
|
|
var query = this.Repository.Select
|
|
//按钮名称
|
|
.WhereIf(!string.IsNullOrWhiteSpace(pagingSearchInput.Search?.Name),
|
|
w => w.Name.Contains(pagingSearchInput.Search.Name ?? ""))
|
|
.OrderByDescending(w => w.Id)
|
|
.Select(w => new
|
|
{
|
|
w.Id,
|
|
w.Action,w.Image,w.X,w.Y,w.Widht,w.Height,w.Text,w.Name,w.DelaySecond,w.TenantId,
|
|
})
|
|
;
|
|
var result = await Repository.AsPagingViewAsync(query, pagingSearchInput);
|
|
|
|
// 设置列
|
|
//result.GetColumn(query, w => w.OperatorName).SetColumn("操作人");
|
|
//result.GetColumn(query, w => w. !).SetColumn<SysUser>(w => w.Name!);
|
|
return result;
|
|
}
|
|
|
|
} |