NceeCourseCombAppService.cs 1008 B

12345678910111213141516171819202122232425262728293031323334
  1. namespace YBEE.EQM.Application;
  2. /// <summary>
  3. /// 高中选科组合管理服务
  4. /// </summary>
  5. [ApiDescriptionSettings(Name = "ncee-course-comb")]
  6. [Route("ncee/course/comb")]
  7. public class NceeCourseCombAppService : IDynamicApiController
  8. {
  9. private readonly INceeCourseCombService _nceeCourseCombService;
  10. public NceeCourseCombAppService(INceeCourseCombService courseCombService)
  11. {
  12. _nceeCourseCombService = courseCombService;
  13. }
  14. /// <summary>
  15. /// 根据ID获取高中选科组合
  16. /// </summary>
  17. /// <param name="id"></param>
  18. /// <returns></returns>
  19. public async Task<NceeCourseCombOutput> GetById([FromQuery][Required] short id)
  20. {
  21. return await _nceeCourseCombService.GetById(id);
  22. }
  23. /// <summary>
  24. /// 获取所有高中选科组合
  25. /// </summary>
  26. /// <returns></returns>
  27. [AllowAnonymous]
  28. public async Task<List<NceeCourseCombOutput>> GetAllList()
  29. {
  30. return await _nceeCourseCombService.GetAllList();
  31. }
  32. }