AdoS8DictionariesController.cs 578 B

1234567891011121314151617181920
  1. using Admin.NET.Plugin.AiDOP.Service.S8;
  2. namespace Admin.NET.Plugin.AiDOP.Controllers.S8;
  3. [ApiController]
  4. [Route("api/aidop/s8/dictionaries")]
  5. [NonUnify]
  6. public class AdoS8DictionariesController : ControllerBase
  7. {
  8. private readonly S8DictionaryService _svc;
  9. public AdoS8DictionariesController(S8DictionaryService svc) => _svc = svc;
  10. [HttpGet("{dictType}")]
  11. public IActionResult Get(string dictType)
  12. {
  13. var result = _svc.GetDictionary(dictType);
  14. return result == null ? NotFound(new { message = "未知字典类型" }) : Ok(result);
  15. }
  16. }