package com.ym.mec.teacher.controller;

import com.ym.mec.auth.api.dto.MusicScoreQueryInfo;
import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
import com.ym.mec.biz.service.SysMusicScoreCategoriesService;
import com.ym.mec.common.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("sysMusicScoreCategories")
@Api(tags = "曲库分类服务")
@RestController
public class SysMusicScoreCategoriesController extends BaseController {

    @Autowired
    private SysMusicScoreCategoriesService sysMusicScoreCategoriesService;


    @ApiOperation(value = "分页查询")
    @GetMapping("/queryPage")
    public Object queryPage(SysExamSongQueryInfo queryInfo) {
        return succeed(sysMusicScoreCategoriesService.queryPage(queryInfo));
    }

    @ApiOperation(value = "树状列表")
    @GetMapping("/queryTree")
    public Object queryTree(MusicScoreQueryInfo queryInfo) {
        return succeed(sysMusicScoreCategoriesService.queryTree(queryInfo));
    }

    @ApiOperation(value = "获取分类详情")
    @GetMapping("/get")
    public Object get(Integer id) {
        return succeed(sysMusicScoreCategoriesService.get(id));
    }
}
