田爽 1 year ago
parent
commit
ea66d4b51c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/Hotline.Api/Controllers/SettingController.cs

+ 3 - 2
src/Hotline.Api/Controllers/SettingController.cs

@@ -202,8 +202,9 @@ namespace Hotline.Api.Controllers
 		public async Task<PagedDto<BusinessTagListVo>> SuperviseList([FromQuery] BusinessTagListDto dto)
 		{
 			var (total, items) = await _businessTag.Queryable()
-				.WhereIF(dto.Type > 0, d => d.Type >= dto.Type)
-				.WhereIF(dto.BusinessType > 0, d => d.BusinessType <= dto.BusinessType)
+				.WhereIF(!string.IsNullOrEmpty(dto.Keyword), d => d.Name.Contains(dto.Keyword!))
+				.WhereIF(dto.Type> 0, d => d.Type == dto.Type)
+				.WhereIF(dto.BusinessType > 0, d => d.BusinessType == dto.BusinessType)
 				.OrderByDescending(x => x.CreationTime)
 				.ToPagedListAsync(dto.PageIndex, dto.PageSize, HttpContext.RequestAborted);
 			return new PagedDto<BusinessTagListVo>(total, _mapper.Map<IReadOnlyList<BusinessTagListVo>>(items));