@@ -39,6 +39,10 @@ namespace IRaCIS.Application.Contracts
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class ChildInQuery:SortInput
|
||||
{
|
||||
public Guid ParentId { get; set; }
|
||||
}
|
||||
|
||||
public class AddOrEditBasicDic
|
||||
{
|
||||
|
||||
@@ -182,13 +182,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// <summary>
|
||||
/// 获取子项数组
|
||||
/// </summary>
|
||||
/// <param name="parentId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{parentId:guid}")]
|
||||
public async Task<List<BasicDicView>> GetChildList(Guid parentId)
|
||||
[HttpPost]
|
||||
public async Task<List<BasicDicView>> GetChildList(ChildInQuery inQuery)
|
||||
{
|
||||
return await _dicRepository.Where(t => t.ParentId == parentId)
|
||||
.OrderBy(t => t.ShowOrder).ProjectTo<BasicDicView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
return await _dicRepository.Where(t => t.ParentId == inQuery.ParentId)
|
||||
.ProjectTo<BasicDicView>(_mapper.ConfigurationProvider).SortToListAsync(inQuery);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user