package com.ym.mec.web.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
import com.ym.mec.common.controller.BaseController;

@RequestMapping("musicGroupSubjectPlan")
@Api(tags = "乐团声部计划服务")
@RestController
public class MusicGroupSubjectPlanController extends BaseController {

    @Autowired
    private MusicGroupSubjectPlanService musicGroupSubjectPlanService;

    @ApiOperation(value = "根据id查询乐团声部招生情况")
    @GetMapping("/get/{id}")
    public Object get(@ApiParam(value = "乐团编号", required = true) @PathVariable("id") int id) {
        return succeed(musicGroupSubjectPlanService.get(id));
    }

    @ApiOperation(value = "乐团声部分班情况")
    @GetMapping("/getMusicSubjectClass")
    public Object getMusicSubjectClass(@ApiParam(value = "乐团编号", required = true) int musicGroupId) {
        return succeed(musicGroupSubjectPlanService.getMusicSubjectClassPlan(musicGroupId));
    }

}
