ExamSubjectSongController.java 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.keao.edu.controller;
  2. import com.keao.edu.common.controller.BaseController;
  3. import com.keao.edu.common.entity.HttpResponseResult;
  4. import com.keao.edu.user.entity.ExamSong;
  5. import com.keao.edu.user.entity.ExamSubjectSong;
  6. import com.keao.edu.user.service.ExamSubjectSongService;
  7. import io.swagger.annotations.Api;
  8. import io.swagger.annotations.ApiImplicitParam;
  9. import io.swagger.annotations.ApiImplicitParams;
  10. import io.swagger.annotations.ApiOperation;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.GetMapping;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import java.util.List;
  16. /**
  17. * @Author Joburgess
  18. * @Date 2020.06.18
  19. */
  20. @RestController
  21. @RequestMapping("examSubjectSong")
  22. @Api(tags = "考级内容服务")
  23. public class ExamSubjectSongController extends BaseController {
  24. @Autowired
  25. private ExamSubjectSongService examSubjectSongService;
  26. @ApiOperation("获取考级专业相应级别列表-报名")
  27. @ApiImplicitParams({
  28. @ApiImplicitParam(name = "examinationBasicId", value = "项目id", required = true, dataType = "Integer"),
  29. @ApiImplicitParam(name = "examSubjectId", value = "考试项目专业id", required = true, dataType = "Integer")})
  30. @GetMapping(value = "/getExamSubjectLevel")
  31. public HttpResponseResult<List<ExamSubjectSong>> getExamSubjectLevel(Integer examinationBasicId, Long examSubjectId) {
  32. return succeed(examSubjectSongService.getExamSubjectLevels(examinationBasicId, examSubjectId));
  33. }
  34. @ApiOperation("获取考级专业相应级别的曲目-报名")
  35. @ApiImplicitParams({
  36. @ApiImplicitParam(name = "examinationBasicId", value = "项目id", required = true, dataType = "Integer"),
  37. @ApiImplicitParam(name = "examSubjectId", value = "考试项目专业id", required = true, dataType = "Integer"),
  38. @ApiImplicitParam(name = "level", value = "级别", required = true, dataType = "Integer")})
  39. @GetMapping(value = "/getExamSubjectSong")
  40. public HttpResponseResult<List<ExamSong>> getExamSubjectSong(Integer examinationBasicId, Long examSubjectId, Integer level) {
  41. return succeed(examSubjectSongService.getExamSubjectSong(examinationBasicId, examSubjectId, level));
  42. }
  43. }