Skip to content

Commit

Permalink
Added CustomMark property to GetCategoryListDto
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed May 13, 2020
1 parent 4ffd7ea commit 5ef3c47
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.props
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.9</Version>
<Version>0.1.10</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
Expand Down
@@ -1,4 +1,5 @@
using System;
using JetBrains.Annotations;
using Volo.Abp.Application.Dtos;

namespace EasyAbp.SharedResources.Categories.Dtos
Expand All @@ -8,5 +9,8 @@ public class GetCategoryListDto : PagedAndSortedResultRequestDto
public Guid? OwnerUserId { get; set; }

public Guid? RootCategoryId { get; set; }

[CanBeNull]
public string CustomMark { get; set; }
}
}
Expand Up @@ -32,7 +32,10 @@ public class CategoryAppService : CrudAppService<Category, CategoryDto, Guid, Ge

protected override IQueryable<Category> 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<CategoryDto> CreateAsync(CreateUpdateCategoryDto input)
Expand Down

0 comments on commit 5ef3c47

Please sign in to comment.