using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using XYY.Core.Standard.Mvc;
using XYY.Service.Standard.KnowledgeBase;

namespace KnowledgeBase.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class DictListController : ControllerBase
    {
        IKnowledgeSevice knowledgeSevice;

        public DictListController(IKnowledgeSevice knowledgeSevice)
        {
            this.knowledgeSevice = knowledgeSevice;
        }
        /// <summary>
        /// 获取部门列表
        /// </summary>
        /// <returns>部门列表</returns>
        [HttpGet]
        public async Task<ApiJsonModel<List<string>>> Get()
        {
            return ApiJsonModel<List<string>>.OK(await this.knowledgeSevice.GetDicts());
        }
    }
}
