package com.keao.edu.controller;

import com.keao.edu.common.controller.BaseController;
import com.keao.edu.common.entity.HttpResponseResult;
import com.keao.edu.user.dto.ExamSubjectDto;
import com.keao.edu.user.service.ExamSubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("examSubject")
@Api(tags = "考级内容服务")
public class ExamSubjectController extends BaseController {

    @Autowired
    private ExamSubjectService examSubjectService;

    @ApiOperation("获取考试项目专业")
    @ApiImplicitParam(name = "ExamId", value = "考试项目id", required = true, dataType = "Integer")
    @GetMapping(value = "/getExamSubjects")
    public HttpResponseResult<List<ExamSubjectDto>> getExamSubjects(Integer examId) {
        return succeed(examSubjectService.getExamSubjects(examId));
    }

}
