|
@@ -274,18 +274,19 @@ namespace Hotline.Api.Controllers
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[Permission(EPermission.GetSysDicData)]
|
|
[Permission(EPermission.GetSysDicData)]
|
|
[HttpGet("dictdata-type")]
|
|
[HttpGet("dictdata-type")]
|
|
- public async Task<PagedDto<SysDicData>> GetSysDicData([FromQuery] GetSysDicDataDto dto)
|
|
|
|
|
|
+ public async Task<List<SysDicData>> GetSysDicData([FromQuery] GetSysDicDataDto dto)
|
|
{
|
|
{
|
|
- var (total, items) = await _sysDicDataRepository.QueryPagedAsync(
|
|
|
|
- x=> true,
|
|
|
|
- x=>x.OrderByDescending(d=>d.CreationTime),
|
|
|
|
- dto.PageIndex,
|
|
|
|
- dto.PageSize,
|
|
|
|
- false,
|
|
|
|
- whereIfs: (true, x => x.DicTypeId == dto.typeid)
|
|
|
|
- );
|
|
|
|
|
|
+ //var (total, items) = await _sysDicDataRepository.QueryPagedAsync(
|
|
|
|
+ // x=> true,
|
|
|
|
+ // x=>x.OrderByDescending(d=>d.CreationTime),
|
|
|
|
+ // dto.PageIndex,
|
|
|
|
+ // dto.PageSize,
|
|
|
|
+ // false,
|
|
|
|
+ // whereIfs: (true, x => x.DicTypeId == dto.typeid)
|
|
|
|
+ // );
|
|
|
|
+ return await _sysDicDataRepository.Queryable().Where(x => x.DicTypeId == dto.typeid).WhereIF(!string.IsNullOrEmpty(dto.datavalue),x=>x.DicDataValue.Contains(dto.datavalue)).ToTreeAsync(x=>x.children,x=>x.ParentId,"");
|
|
//return await _sysDicDataRepository.Queryable().Where(x => x.DicTypeId == typeid).ToListAsync();
|
|
//return await _sysDicDataRepository.Queryable().Where(x => x.DicTypeId == typeid).ToListAsync();
|
|
- return new PagedDto<SysDicData> { Total = total, Items = items };
|
|
|
|
|
|
+ //return new PagedDto<SysDicData> { Total = total, Items = items };
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|