|
@@ -649,11 +649,6 @@ namespace Hotline.Api.Controllers
|
|
|
.Where(x => x.IsDeleted == false)
|
|
|
.Where(x => x.Status == EKnowledgeStatus.OnShelf)
|
|
|
.Where(x => x.KnowledgeType.Any(t => t.KnowledgeType.KnowledgeTypeOrgs.Any(to => to.OrgId == _sessionContext.RequiredOrgId) || t.KnowledgeType.KnowledgeTypeOrgs.Any() == false))
|
|
|
- // .WhereIF(dto.RetrievalType == EKnowledgeRetrievalType.All && !string.IsNullOrEmpty(dto.Keyword), d => d.Title.Contains(dto.Keyword!) || d.Content.Contains(dto.Keyword!))
|
|
|
- //.WhereIF(dto.RetrievalType == EKnowledgeRetrievalType.Title && !string.IsNullOrEmpty(dto.Keyword), d => d.Title.Contains(dto.Keyword!))
|
|
|
- //.WhereIF(dto.RetrievalType == EKnowledgeRetrievalType.Content && !string.IsNullOrEmpty(dto.Keyword), d => d.Content.Contains(dto.Keyword!))
|
|
|
- //.WhereIF(dto.RetrievalType == EKnowledgeRetrievalType.Summary && !string.IsNullOrEmpty(dto.Keyword), d => d.Summary != null && d.Summary.Contains(dto.Keyword!))
|
|
|
- //.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => SqlFunc.JsonLike(x.KnowledgeType, typeSpliceName))
|
|
|
.WhereIF(!string.IsNullOrEmpty(typeSpliceName), x => x.KnowledgeType.Any(t => t.KnowledgeTypeSpliceName.EndsWith(typeSpliceName)))
|
|
|
.WhereIF(!string.IsNullOrEmpty(hotspotHotSpotFullName), x => x.HotspotType.HotSpotFullName.EndsWith(hotspotHotSpotFullName!))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.HotspotName), x => x.HotspotType.HotSpotFullName.EndsWith(dto.HotspotName!))
|
|
@@ -682,6 +677,10 @@ namespace Hotline.Api.Controllers
|
|
|
}
|
|
|
sugar.Where(exp.ToExpression());
|
|
|
}
|
|
|
+ if (dto.Content.NotNullOrEmpty())
|
|
|
+ {
|
|
|
+ var keywords = dto.Content.SplitKeywords();
|
|
|
+ }
|
|
|
|
|
|
switch (dto.Sort)
|
|
|
{
|
|
@@ -707,7 +706,7 @@ namespace Hotline.Api.Controllers
|
|
|
public async Task<Dictionary<string, dynamic>> GetKnowretrievalBaseData()
|
|
|
{
|
|
|
return _baseDataApplication
|
|
|
- .KnowledgeRetrievalType(new[] { 3, 4})
|
|
|
+ .KnowledgeRetrievalType([3, 4])
|
|
|
.Build();
|
|
|
}
|
|
|
|