|
@@ -0,0 +1,40 @@
|
|
|
|
+package com.ym.mec.web.controller.school;
|
|
|
|
+
|
|
|
|
+import com.ym.mec.auth.api.dto.MusicScoreQueryInfo;
|
|
|
|
+import com.ym.mec.auth.api.entity.SysUser;
|
|
|
|
+import com.ym.mec.biz.dal.entity.SchoolStaff;
|
|
|
|
+import com.ym.mec.biz.service.OrganizationService;
|
|
|
|
+import com.ym.mec.biz.service.SchoolStaffService;
|
|
|
|
+import com.ym.mec.biz.service.SysMusicScoreCategoriesService;
|
|
|
|
+import com.ym.mec.biz.service.SysUserService;
|
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
+
|
|
|
|
+@RequestMapping("${app-config.url.web:}/schoolMusicScore")
|
|
|
|
+@Api(tags = "智能陪练")
|
|
|
|
+@RestController
|
|
|
|
+public class SchoolMusicScoreController extends BaseController {
|
|
|
|
+ @Resource
|
|
|
|
+ private SysMusicScoreCategoriesService sysMusicScoreCategoriesService;
|
|
|
|
+ @Resource
|
|
|
|
+ private SysUserService sysUserService;
|
|
|
|
+ @Resource
|
|
|
|
+ private SchoolStaffService schoolStaffService;
|
|
|
|
+ @Resource
|
|
|
|
+ private OrganizationService organizationService;
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "树状列表")
|
|
|
|
+ @GetMapping("/queryTree")
|
|
|
|
+ public Object queryTree(MusicScoreQueryInfo queryInfo) {
|
|
|
|
+ SysUser sysUser = sysUserService.getUser();
|
|
|
|
+ SchoolStaff schoolStaff = schoolStaffService.getByUserId(sysUser.getId());
|
|
|
|
+ String teachingMaterialIds = organizationService.getTeachingMaterialIds(schoolStaff.getOrganIdList(), sysUser.getTenantId());
|
|
|
|
+ return succeed(sysMusicScoreCategoriesService.queryCategoriesTreeList(teachingMaterialIds, queryInfo.getEnable()));
|
|
|
|
+ }
|
|
|
|
+}
|