diff --git a/common.props b/common.props index 84c8a37..dae77c8 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.1.9 + 0.1.10 $(NoWarn);CS1591 true EasyAbp Team diff --git a/src/EasyAbp.SharedResources.Application.Contracts/EasyAbp/SharedResources/Categories/Dtos/GetCategoryListDto.cs b/src/EasyAbp.SharedResources.Application.Contracts/EasyAbp/SharedResources/Categories/Dtos/GetCategoryListDto.cs index e7138a2..1e74992 100644 --- a/src/EasyAbp.SharedResources.Application.Contracts/EasyAbp/SharedResources/Categories/Dtos/GetCategoryListDto.cs +++ b/src/EasyAbp.SharedResources.Application.Contracts/EasyAbp/SharedResources/Categories/Dtos/GetCategoryListDto.cs @@ -1,4 +1,5 @@ using System; +using JetBrains.Annotations; using Volo.Abp.Application.Dtos; namespace EasyAbp.SharedResources.Categories.Dtos @@ -8,5 +9,8 @@ public class GetCategoryListDto : PagedAndSortedResultRequestDto public Guid? OwnerUserId { get; set; } public Guid? RootCategoryId { get; set; } + + [CanBeNull] + public string CustomMark { get; set; } } } \ No newline at end of file diff --git a/src/EasyAbp.SharedResources.Application/EasyAbp/SharedResources/Categories/CategoryAppService.cs b/src/EasyAbp.SharedResources.Application/EasyAbp/SharedResources/Categories/CategoryAppService.cs index db1f02f..c05eb4a 100644 --- a/src/EasyAbp.SharedResources.Application/EasyAbp/SharedResources/Categories/CategoryAppService.cs +++ b/src/EasyAbp.SharedResources.Application/EasyAbp/SharedResources/Categories/CategoryAppService.cs @@ -32,7 +32,10 @@ public class CategoryAppService : CrudAppService CreateFilteredQuery(GetCategoryListDto input) { - return _repository.GetQueryable(input.OwnerUserId).Where(x => x.ParentCategoryId == input.RootCategoryId); + var query = _repository.GetQueryable(input.OwnerUserId) + .Where(x => x.ParentCategoryId == input.RootCategoryId); + + return input.CustomMark != null ? query.Where(x => x.CustomMark == input.CustomMark) : query; } public override async Task CreateAsync(CreateUpdateCategoryDto input)