You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Tiobon.Web.Core/Tiobon.Core.Services/Ghrh/Ghrh_ConfigGroupServices.cs

29 lines
1.0 KiB

namespace Tiobon.Core.Services;
/// <summary>
/// 招聘参数配置组 (服务)
/// </summary>
public class Ghrh_ConfigGroupServices : BaseServices<Ghrh_ConfigGroup, Ghrh_ConfigGroupDto, InsertGhrh_ConfigGroupInput, EditGhrh_ConfigGroupInput>, IGhrh_ConfigGroupServices
{
private readonly IBaseRepository<Ghrh_ConfigGroup> _dal;
public Ghrh_ConfigGroupServices(ICaching caching, IBaseRepository<Ghrh_ConfigGroup> dal)
{
this._dal = dal;
base.BaseDal = dal;
base._caching = caching;
}
public override async Task<ServicePageResult<Ghrh_ConfigGroupDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true)
{
filter.orderBy = "SortNo ASC";
var result = await base.QueryFilterPage(filter, condition, IsEnable);
var configs = await Db.Queryable<Ghrh_Config>().OrderBy(x => x.Sequence).ToListAsync();
result.result.DT_TableDataT1.ForEach(x =>
{
x.Configs = configs.Where(o => o.GroupId == x.Id).ToList();
});
return result;
}
}