ExamPaperQuestionMajorAppService.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 试卷大题管理服务
  5. /// </summary>
  6. [ApiDescriptionSettings(Name = "exam-paper-question-major")]
  7. [Route("exam/paper/question/major")]
  8. public class ExamPaperQuestionMajorAppService : IDynamicApiController
  9. {
  10. private readonly IExamPaperQuestionMajorService _examPaperQuestionMajorService;
  11. public ExamPaperQuestionMajorAppService(IExamPaperQuestionMajorService examPaperQuestionMajorService)
  12. {
  13. _examPaperQuestionMajorService = examPaperQuestionMajorService;
  14. }
  15. /// <summary>
  16. /// 添加
  17. /// </summary>
  18. /// <param name="input"></param>
  19. /// <returns></returns>
  20. public async Task Add(AddExamPaperQuestionMajorInput input)
  21. {
  22. await _examPaperQuestionMajorService.Add(input);
  23. }
  24. /// <summary>
  25. /// 更新
  26. /// </summary>
  27. /// <param name="input"></param>
  28. /// <returns></returns>
  29. public async Task Update(UpdateExamPaperQuestionMajorInput input)
  30. {
  31. await _examPaperQuestionMajorService.Update(input);
  32. }
  33. /// <summary>
  34. /// 删除
  35. /// </summary>
  36. /// <param name="input"></param>
  37. /// <returns></returns>
  38. public async Task Del(BaseId input)
  39. {
  40. await _examPaperQuestionMajorService.Del(input);
  41. }
  42. /// <summary>
  43. /// 根据试卷ID获取大题列表
  44. /// </summary>
  45. /// <param name="examPaperId"></param>
  46. /// <returns></returns>
  47. public async Task<List<ExamPaperQuestionMajorOutput>> GetListByExamPaperId(int examPaperId)
  48. {
  49. return await _examPaperQuestionMajorService.GetListByExamPaperId(examPaperId);
  50. }
  51. }