package com.ym.mec.web.controller.teacher;

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

import java.util.List;

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

import com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary;
import com.ym.mec.biz.service.TeacherDefaultMusicGroupSalaryService;
import com.ym.mec.common.controller.BaseController;
import com.ym.mec.common.page.QueryInfo;

@RequestMapping("teacherDefaultMusicGroupSalary")
@Api(tags = "教师薪酬服务")
@RestController
public class TeacherDefaultMusicGroupSalaryController extends BaseController {

    @Autowired
    private TeacherDefaultMusicGroupSalaryService teacherDefaultMusicGroupSalaryService;

    @ApiOperation(value = "批量新增、修改、删除教师乐团课薪酬")
    @PostMapping("/batchUpset")
    public Object batchUpset(@RequestBody List<TeacherDefaultMusicGroupSalary> teacherDefaultMusicGroupSalaries) {
        teacherDefaultMusicGroupSalaryService.batchUpset(teacherDefaultMusicGroupSalaries);
        return succeed();
    }

    @ApiOperation(value = "分页查询教师薪酬")
    @GetMapping("/queryPage")
    public Object queryPage(QueryInfo queryInfo) {
        return succeed(teacherDefaultMusicGroupSalaryService.queryPage(queryInfo));
    }
}
