|
@@ -1,47 +1,41 @@
|
|
|
package com.ym.mec.teacher.controller;
|
|
|
|
|
|
-import com.ym.mec.biz.dal.entity.SysMusicScoreCategories;
|
|
|
+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 com.ym.mec.common.page.QueryInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+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("sysMusicScoreCategorie")
|
|
|
-@Api(tags = "曲库服务")
|
|
|
+@RequestMapping("sysMusicScoreCategories")
|
|
|
+@Api(tags = "曲库分类服务")
|
|
|
@RestController
|
|
|
public class SysMusicScoreCategoriesController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private SysMusicScoreCategoriesService sysMusicScoreCategoriesService;
|
|
|
|
|
|
- @ApiOperation(value = "新增")
|
|
|
- @PostMapping("/add")
|
|
|
- public Object add(SysMusicScoreCategories sysMusicScoreCategories) {
|
|
|
- sysMusicScoreCategoriesService.insert(sysMusicScoreCategories);
|
|
|
- return succeed();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "修改")
|
|
|
- @PostMapping("/update")
|
|
|
- public Object update(SysMusicScoreCategories sysMusicScoreCategories) {
|
|
|
- sysMusicScoreCategoriesService.update(sysMusicScoreCategories);
|
|
|
- return succeed();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "删除")
|
|
|
- @PostMapping("/del")
|
|
|
- public Object del(Integer id) {
|
|
|
- sysMusicScoreCategoriesService.delete(id);
|
|
|
- return succeed();
|
|
|
- }
|
|
|
|
|
|
@ApiOperation(value = "分页查询")
|
|
|
@GetMapping("/queryPage")
|
|
|
- public Object queryPage(QueryInfo queryInfo) {
|
|
|
+ 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));
|
|
|
+ }
|
|
|
}
|