Quellcode durchsuchen

知识库管理 添加创建人

libin vor 5 Tagen
Ursprung
Commit
8e31aed018

+ 1 - 0
src/Hotline.Application/Knowledge/KnowApplication.cs

@@ -207,6 +207,7 @@ namespace Hotline.Application.Knowledge
                   .WhereIF(pagedDto.StartUpdateTime.HasValue, x => x.LastModificationTime >= pagedDto.StartUpdateTime)
                   .WhereIF(pagedDto.EndUpdateTime.HasValue, x => x.LastModificationTime <= pagedDto.EndUpdateTime)
                 .WhereIF(!string.IsNullOrEmpty(pagedDto.Attribution), x => x.Attribution == pagedDto.Attribution)
+                .WhereIF(!string.IsNullOrEmpty(pagedDto.CreatorName), x => x.CreatorName.Contains(pagedDto.CreatorName))
                 .OrderByDescending(d => d.CreationTime)
                 .ToPagedListAsync(pagedDto, cancellationToken);
             //返回数据

+ 5 - 0
src/Hotline.Share/Dtos/Knowledge/KnowPagedListDto.cs

@@ -95,4 +95,9 @@ public record KnowPagedListDto : PagedKeywordRequest
     /// </summary>
     public DateTime? EndUpdateTime { get; set; }
 
+    /// <summary>
+    /// 创建人
+    /// </summary>
+    public string? CreatorName { get; set; }
+
 }