Jelajahi Sumber

Merge branch 'master' of http://git.fwt.com/Hotline/hotline

xf 2 tahun lalu
induk
melakukan
396ee83d57

+ 1 - 1
src/Hotline.Api/Controllers/KnowledgeCommonController.cs

@@ -134,7 +134,7 @@ namespace Hotline.Api.Controllers
         [HttpGet("treelist")]
         public async Task<List<KnowledgeType>> GetTreeList(bool? IsEnable)
         {
-            return await _knowledgeTypeRepository.Queryable().WhereIF(IsEnable.HasValue, p => p.IsEnable == IsEnable).ToTreeAsync(it => it.Child, it => it.ParentId, null);
+            return await _knowledgeTypeRepository.Queryable().WhereIF(IsEnable.HasValue, p => p.IsEnable == IsEnable).ToTreeAsync(it => it.children, it => it.ParentId, null);
         }
 
         /// <summary>

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

@@ -1,4 +1,5 @@
-using Hotline.Application.FlowEngine;
+using Google.Protobuf.WellKnownTypes;
+using Hotline.Application.FlowEngine;
 using Hotline.Application.Knowledge;
 using Hotline.FlowEngine.Definitions;
 using Hotline.FlowEngine.Workflows;
@@ -15,6 +16,7 @@ using Hotline.Share.Enums.KnowledgeBase;
 using Hotline.Users;
 using MapsterMapper;
 using MediatR;
+using Microsoft.AspNetCore.DataProtection.KeyManagement;
 using Microsoft.AspNetCore.Mvc;
 using SqlSugar;
 using XF.Domain.Authentications;
@@ -373,7 +375,12 @@ namespace Hotline.Api.Controllers
         [HttpGet("knowledge-status-data")]
         public async Task<object> KnowledgeStatus()
         {
-            return EnumExts.GetDescriptions<EKnowledgeStatus>();
+            return new List<KeyValuePair<int, string>>
+            {
+                new KeyValuePair<int, string>(1, "审核中"),
+                new KeyValuePair<int, string>(3, "已上架"),
+                new KeyValuePair<int, string>(4, "已下架")
+            };
         }
 
         /// <summary>

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

@@ -41,5 +41,5 @@ public class KnowledgeType : FullStateEntity
     /// 子级
     /// </summary>
     [SqlSugar.SugarColumn(IsIgnore = true)]
-    public List<KnowledgeType> Child { get; set; }
+    public List<KnowledgeType> children { get; set; }
 }