Browse Source

曲目列表接口优化

zouxuan 6 months ago
parent
commit
7882ce42d6

+ 2 - 2
mec-application/src/main/java/com/ym/mec/student/controller/MusicPracticeRecordController.java

@@ -56,7 +56,7 @@ public class MusicPracticeRecordController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/detail/{id}")
-    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id) {
+    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id,Boolean simpleFlag) {
 
         MusicPracticeRecordWrapper.Entity wrapper = musicPracticeRecordService.detail(id);
 
@@ -74,7 +74,7 @@ public class MusicPracticeRecordController {
         }
         MusicPracticeRecordWrapper.MusicPracticeRecord from = MusicPracticeRecordWrapper.MusicPracticeRecord.from(JSON.toJSONString(wrapper));
 
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(Integer.parseInt(wrapper.getMusicSheetId()));
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(Integer.parseInt(wrapper.getMusicSheetId()),simpleFlag);
         if (musicSheet != null) {
             from.setRhythmFlag(musicSheet.getEvaluationStandard() != EEvaluationStandard.FREQUENCY);
         }

+ 2 - 2
mec-application/src/main/java/com/ym/mec/student/controller/MusicSheetController.java

@@ -67,8 +67,8 @@ public class MusicSheetController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Integer id) {
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id);
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Integer id,Boolean simpleFlag) {
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id, simpleFlag);
         musicSheet.setBizId(Long.valueOf(id));
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 2 - 2
mec-application/src/main/java/com/ym/mec/student/controller/open/OpenMusicSheetController.java

@@ -52,8 +52,8 @@ public class OpenMusicSheetController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.OpenMusicSheetDetail> cbsDetail(@PathVariable("id") Integer id) {
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id);
+    public R<MusicSheetVo.OpenMusicSheetDetail> cbsDetail(@PathVariable("id") Integer id,Boolean simpleFlag) {
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id, simpleFlag);
         musicSheet.setBizId(Long.valueOf(id));
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 2 - 2
mec-application/src/main/java/com/ym/mec/teacher/controller/MusicPracticeRecordController.java

@@ -57,7 +57,7 @@ public class MusicPracticeRecordController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/detail/{id}")
-    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id) {
+    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id,Boolean simpleFlag) {
 
         MusicPracticeRecordWrapper.Entity wrapper = musicPracticeRecordService.detail(id);
 
@@ -75,7 +75,7 @@ public class MusicPracticeRecordController {
         }
         MusicPracticeRecordWrapper.MusicPracticeRecord from = MusicPracticeRecordWrapper.MusicPracticeRecord.from(JSON.toJSONString(wrapper));
 
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(Integer.parseInt(wrapper.getMusicSheetId()));
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(Integer.parseInt(wrapper.getMusicSheetId()),simpleFlag);
         if (musicSheet != null) {
             from.setRhythmFlag(musicSheet.getEvaluationStandard() != EEvaluationStandard.FREQUENCY);
         }

+ 2 - 2
mec-application/src/main/java/com/ym/mec/teacher/controller/MusicSheetController.java

@@ -65,8 +65,8 @@ public class MusicSheetController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Integer id) {
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id);
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Integer id,Boolean simpleFlag) {
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id, simpleFlag);
         musicSheet.setBizId(Long.valueOf(id));
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 2 - 2
mec-application/src/main/java/com/ym/mec/teacher/controller/open/OpenMusicSheetController.java

@@ -52,8 +52,8 @@ public class OpenMusicSheetController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.OpenMusicSheetDetail> cbsDetail(@PathVariable("id") Integer id) {
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id);
+    public R<MusicSheetVo.OpenMusicSheetDetail> cbsDetail(@PathVariable("id") Integer id,Boolean simpleFlag) {
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id, simpleFlag);
         musicSheet.setBizId(Long.valueOf(id));
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 2 - 2
mec-application/src/main/java/com/ym/mec/web/controller/MusicPracticeRecordController.java

@@ -55,7 +55,7 @@ public class MusicPracticeRecordController {
             @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/detail/{id}")
-    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id) {
+    public R<MusicPracticeRecordWrapper.MusicPracticeRecord> detail(@PathVariable("id") Long id,Boolean simpleFlag) {
 
         MusicPracticeRecordWrapper.Entity wrapper = musicPracticeRecordService.detail(id);
 
@@ -73,7 +73,7 @@ public class MusicPracticeRecordController {
         }
         MusicPracticeRecordWrapper.MusicPracticeRecord from = MusicPracticeRecordWrapper.MusicPracticeRecord.from(JSON.toJSONString(wrapper));
 
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(Integer.parseInt(wrapper.getMusicSheetId()));
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(Integer.parseInt(wrapper.getMusicSheetId()),simpleFlag);
         if (musicSheet != null) {
             from.setRhythmFlag(musicSheet.getEvaluationStandard() != EEvaluationStandard.FREQUENCY);
         }

+ 2 - 2
mec-application/src/main/java/com/ym/mec/web/controller/MusicSheetController.java

@@ -59,8 +59,8 @@ public class MusicSheetController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Integer id) {
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id);
+    public R<MusicSheetVo.MusicSheetDetail> cbsDetail(@PathVariable("id") Integer id,Boolean simpleFlag) {
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id, simpleFlag);
         musicSheet.setBizId(Long.valueOf(id));
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 2 - 2
mec-application/src/main/java/com/ym/mec/web/controller/open/OpenMusicSheetController.java

@@ -52,8 +52,8 @@ public class OpenMusicSheetController {
         @ApiImplicitParam(name = "id", value = "id", dataType = "long")
     })
     @GetMapping("/cbsDetail/{id}")
-    public R<MusicSheetVo.OpenMusicSheetDetail> cbsDetail(@PathVariable("id") Integer id) {
-        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id);
+    public R<MusicSheetVo.OpenMusicSheetDetail> cbsDetail(@PathVariable("id") Integer id,Boolean simpleFlag) {
+        CbsMusicSheetWrapper.MusicSheet musicSheet = musicSheetService.cbsDetail(id, simpleFlag);
         musicSheet.setBizId(Long.valueOf(id));
 
         MusicSheetVo.MusicSheetDetail musicSheetDetail = JSON.parseObject(JSON.toJSONString(musicSheet), MusicSheetVo.MusicSheetDetail.class);

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/SysMusicScoreService.java

@@ -60,7 +60,7 @@ public interface SysMusicScoreService extends BaseService<Integer, SysMusicScore
      * @param musicSheetId 业务端曲目ID
      * @return CbsMusicSheetWrapper.MusicSheet
      */
-    CbsMusicSheetWrapper.MusicSheet cbsDetail(Integer musicSheetId);
+    CbsMusicSheetWrapper.MusicSheet cbsDetail(Integer musicSheetId,Boolean simpleFlag);
 
     /**
      * 查询总控平台曲目信息

+ 8 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreServiceImpl.java

@@ -770,7 +770,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
      * @return CbsMusicSheetWrapper.MusicSheet
      */
     @Override
-    public CbsMusicSheetWrapper.MusicSheet cbsDetail(Integer musicSheetId) {
+    public CbsMusicSheetWrapper.MusicSheet cbsDetail(Integer musicSheetId,Boolean simpleFlag) {
         // 曲目信息
         SysMusicScore musicSheet = getDao().get(musicSheetId);
         if (Objects.isNull(musicSheet)) {
@@ -781,7 +781,13 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
         if (StringUtils.isBlank(musicSheet.getCbsMusicSheetId())) {
             throw new BizException("曲目信息异常");
         }
-        return getCbsMusicSheetByCbsId(Long.parseLong(musicSheet.getCbsMusicSheetId()));
+        CbsMusicSheetWrapper.MusicSheet sheet = getCbsMusicSheetByCbsId(Long.parseLong(musicSheet.getCbsMusicSheetId()));
+        if(simpleFlag!= null && simpleFlag){
+            sheet.setExtConfigJson(null);
+            sheet.setExtStyleConfigJson(null);
+            sheet.setExtJianStyleConfigJson(null);
+        }
+        return sheet;
     }
 
     /**