|
@@ -1017,7 +1017,8 @@ namespace Hotline.Api.Controllers
|
|
|
var (total, items) = await _knowledgeWrodRepository.Queryable()
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Tag), x => x.Tag == dto.Tag!)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Classify), x => x.Classify == dto.Classify!)
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Synonym), x => x.Synonym != null && x.Synonym.Contains(dto.Synonym!))
|
|
|
+ .WhereIF(dto.IsEnable.HasValue, x => x.IsEnable == dto.IsEnable)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.Synonym), x => x.Synonym != null && x.Synonym.Contains(dto.Synonym!))
|
|
|
.OrderByDescending(x => x.CreationTime)
|
|
|
.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
|
|
|
return new PagedDto<KnowledgeWordDto>(total, _mapper.Map<IReadOnlyList<KnowledgeWordDto>>(items));
|