| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- package com.keao.edu.user.controller;
- import com.keao.edu.common.controller.BaseController;
- import com.keao.edu.common.entity.HttpResponseResult;
- import com.keao.edu.common.page.PageInfo;
- import com.keao.edu.user.dto.ExamSubjectSongDto;
- import com.keao.edu.user.entity.ExamSong;
- import com.keao.edu.user.entity.ExamSubjectSong;
- import com.keao.edu.user.page.ExamSubjectSongQueryInfo;
- import com.keao.edu.user.service.ExamSubjectSongService;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * @Author Joburgess
- * @Date 2020.06.18
- */
- @RestController
- @RequestMapping("examSubjectSong")
- @Api(tags = "考级内容服务")
- public class ExamSubjectSongController extends BaseController {
- @Autowired
- private ExamSubjectSongService examSubjectSongService;
- @ApiOperation("分页查询")
- @GetMapping(value = "/list")
- public HttpResponseResult<PageInfo<ExamSubjectSongDto>> getList(ExamSubjectSongQueryInfo queryInfo) {
- return succeed(examSubjectSongService.queryExamSubjectSongs(queryInfo));
- }
- @ApiOperation("添加考试内容")
- @PostMapping(value = "/addExamSubjects")
- public HttpResponseResult addExamSubjects(@RequestBody List<ExamSubjectSong> examSubjectSongs) {
- examSubjectSongService.addExamSubjects(examSubjectSongs);
- return succeed();
- }
- @ApiOperation("更新考试内容")
- @PostMapping(value = "/update")
- public HttpResponseResult update(@RequestBody ExamSubjectSong examSubjectSong) {
- examSubjectSongService.update(examSubjectSong);
- return succeed();
- }
- @ApiOperation(value = "删除考试内容")
- @PostMapping(value = "del")
- public HttpResponseResult del(Long id) {
- examSubjectSongService.deleteExamSubjectSong(id);
- return succeed();
- }
- @ApiOperation("获取考级专业相应级别列表-报名")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "examinationBasicId", value = "项目id", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "examSubjectId", value = "考试项目专业id", required = true, dataType = "Integer")})
- @GetMapping(value = "/getExamSubjectLevel")
- public HttpResponseResult<List<ExamSubjectSong>> getExamSubjectLevel(Integer examinationBasicId, Long examSubjectId) {
- return succeed(examSubjectSongService.getExamSubjectLevels(examinationBasicId, examSubjectId));
- }
- @ApiOperation("获取考级专业相应级别的曲目-报名")
- @ApiImplicitParams({
- @ApiImplicitParam(name = "examinationBasicId", value = "项目id", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "examSubjectId", value = "考试项目专业id", required = true, dataType = "Integer"),
- @ApiImplicitParam(name = "level", value = "级别", required = true, dataType = "Integer")})
- @GetMapping(value = "/getExamSubjectSong")
- public HttpResponseResult<List<ExamSong>> getExamSubjectSong(Integer examinationBasicId, Long examSubjectId, Integer level) {
- return succeed(examSubjectSongService.getExamSubjectSong(examinationBasicId, examSubjectId, level));
- }
- }
|