田爽 1 rok temu
rodzic
commit
1e821b3b54

+ 2 - 2
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -483,7 +483,7 @@ namespace Hotline.Api.Controllers
 				.WhereIF(pagedDto.Status.HasValue && pagedDto.Status == EKnowledgeStatus.OffShelf, x => x.Status == pagedDto.Status || (x.ExpiredTime != null && x.ExpiredTime < DateTime.Now && x.Status != EKnowledgeStatus.Drafts))
 				.WhereIF(pagedDto.IsPublic.HasValue, x => x.IsPublic == pagedDto.IsPublic)
 				.WhereIF(!string.IsNullOrEmpty(pagedDto.Summary), x => x.Summary != null && x.Summary.Contains(pagedDto.Summary!))
-				.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => SqlFunc.JsonListObjectAny(x.KnowledgeType, "Value", typeSpliceName))
+				.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => SqlFunc.JsonLike(x.KnowledgeType, typeSpliceName))
 				.WhereIF(!string.IsNullOrEmpty(hotspotHotSpotFullName), x => x.HotspotType.HotSpotFullName.EndsWith(hotspotHotSpotFullName!))
 				.WhereIF(!string.IsNullOrEmpty(pagedDto.CreateOrgId), x =>  x.CreatorOrgId != null && x.CreatorOrgId.EndsWith(pagedDto.CreateOrgId!))
 				.OrderByDescending(d => d.CreationTime)
@@ -524,7 +524,7 @@ namespace Hotline.Api.Controllers
 				.WhereIF(pagedDto.RetrievalType == EKnowledgeRetrievalType.Title && !string.IsNullOrEmpty(pagedDto.Keyword), d => d.Title.Contains(pagedDto.Keyword!))
 				.WhereIF(pagedDto.RetrievalType == EKnowledgeRetrievalType.Content && !string.IsNullOrEmpty(pagedDto.Keyword), d => d.Content.Contains(pagedDto.Keyword!))
 				.WhereIF(pagedDto.RetrievalType == EKnowledgeRetrievalType.Summary && !string.IsNullOrEmpty(pagedDto.Keyword), d => d.Summary != null && d.Summary.Contains(pagedDto.Keyword!))
-				.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => SqlFunc.JsonListObjectAny(x.KnowledgeType, "Value", typeSpliceName))
+				.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => SqlFunc.JsonLike(x.KnowledgeType, typeSpliceName))
 				.WhereIF(!string.IsNullOrEmpty(hotspotHotSpotFullName), x => x.HotspotType.HotSpotFullName.EndsWith(hotspotHotSpotFullName!))
 				.WhereIF(!string.IsNullOrEmpty(pagedDto.HotspotName), x => x.HotspotType.HotSpotFullName.EndsWith(pagedDto.HotspotName!))
 				.WhereIF(!string.IsNullOrEmpty(pagedDto.CreateOrgId), x => x.CreatorOrgId != null && x.CreatorOrgId.EndsWith(pagedDto.CreateOrgId!))

+ 19 - 0
src/Hotline.Share/Dtos/Kvs.cs

@@ -0,0 +1,19 @@
+namespace Hotline.Share.Dtos;
+
+public class Kvs
+{
+	public Kvs()
+	{
+	}
+
+	public Kvs(string key, string value,string splice)
+	{
+		Key = key;
+		Value = value;
+		Splice = splice;
+	}
+
+	public string Key { get; set; }
+	public string Value { get; set; }
+	public string Splice { get; set; }
+}

+ 1 - 1
src/Hotline/KnowledgeBase/Knowledge.cs

@@ -27,7 +27,7 @@ public class Knowledge : WorkflowEntity//   WorkflowEntity  FullStateEntity
 	///// 知识分类
 	///// </summary>
 	[SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true, ColumnDescription = "知识分类")]
-	public List<Kv>? KnowledgeType { get; set; }
+	public List<Kvs>? KnowledgeType { get; set; }
 
 	/// <summary>
 	/// 热点