ExamPaperQuestionMinorAppService.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 试卷小题管理服务
  5. /// </summary>
  6. public class ExamPaperQuestionMinorAppService : IDynamicApiController
  7. {
  8. private readonly IExamPaperQuestionMinorService _examPaperQuestionMinorService;
  9. public ExamPaperQuestionMinorAppService(IExamPaperQuestionMinorService examPaperQuestionMinorService)
  10. {
  11. _examPaperQuestionMinorService = examPaperQuestionMinorService;
  12. }
  13. /// <summary>
  14. /// 添加
  15. /// </summary>
  16. /// <param name="input"></param>
  17. /// <returns></returns>
  18. public async Task Add(AddExamPaperQuestionMinorInput input)
  19. {
  20. await _examPaperQuestionMinorService.Add(input);
  21. }
  22. /// <summary>
  23. /// 更新
  24. /// </summary>
  25. /// <param name="input"></param>
  26. /// <returns></returns>
  27. public async Task Update(UpdateExamPaperQuestionMinorInput input)
  28. {
  29. await _examPaperQuestionMinorService.Update(input);
  30. }
  31. /// <summary>
  32. /// 批量更新
  33. /// </summary>
  34. /// <param name="input"></param>
  35. /// <returns></returns>
  36. public async Task BatchUpdate(BatchUpdateExamPaperQuestionMinorInput input)
  37. {
  38. await _examPaperQuestionMinorService.BatchUpdate(input);
  39. }
  40. /// <summary>
  41. /// 删除
  42. /// </summary>
  43. /// <param name="input"></param>
  44. /// <returns></returns>
  45. public async Task Del(BaseId input)
  46. {
  47. await _examPaperQuestionMinorService.Del(input);
  48. }
  49. /// <summary>
  50. /// 根据试卷ID获取小题列表
  51. /// </summary>
  52. /// <param name="examPaperId"></param>
  53. /// <returns></returns>
  54. public async Task<List<ExamPaperQuestionMinorOutput>> GetListByExamPaperId([FromQuery][Required] int examPaperId)
  55. {
  56. return await _examPaperQuestionMinorService.GetListByExamPaperId(examPaperId);
  57. }
  58. }