FileListController.cs 1003 B

123456789101112131415161718192021222324252627282930313233
  1. using Microsoft.AspNetCore.Mvc;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using XYY.Core.Standard.Mvc;
  7. using XYY.Service.Standard.KnowledgeBase;
  8. namespace XYY.Api.KnowledgeBase.Controllers
  9. {
  10. [ApiController]
  11. [Route("[controller]")]
  12. public class FileListController : ControllerBase
  13. {
  14. IKnowledgeSevice knowledgeSevice;
  15. public FileListController(IKnowledgeSevice knowledgeSevice)
  16. {
  17. this.knowledgeSevice = knowledgeSevice;
  18. }
  19. /// <summary>
  20. /// 获取部门文件列表
  21. /// </summary>
  22. /// <param name="id"></param>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public async Task<ApiJsonModel<List<Service.Standard.KnowledgeBase.Model.KnowledgeBase>>> Get(string id)
  26. {
  27. return ApiJsonModel<List<Service.Standard.KnowledgeBase.Model.KnowledgeBase>>
  28. .OK(await this.knowledgeSevice.GetFiles(id));
  29. }
  30. }
  31. }