Ver código fonte

Merge branch 'zx_saas_cbs' of http://git.dayaedu.com/yonge/mec into dev

zouxuan 1 ano atrás
pai
commit
8734b98995

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CbsSubjectServiceImpl.java

@@ -3,9 +3,11 @@ package com.ym.mec.biz.service.impl;
 import com.dayaedu.cbs.openfeign.service.CbsSubjectService;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsSubjectApiWrapper;
 import com.google.common.collect.Lists;
+import com.ym.mec.biz.dal.entity.Instrument;
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.wrapper.InstrumentWrapper;
 import com.ym.mec.biz.dal.wrapper.SubjectWrapper;
+import com.ym.mec.biz.service.InstrumentService;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.common.page.PageInfo;
 import org.apache.commons.collections.CollectionUtils;
@@ -25,6 +27,8 @@ public class CbsSubjectServiceImpl implements CbsSubjectService {
 
     @Resource
     private SubjectService subjectService;
+    @Resource
+    private InstrumentService instrumentService;
 
     public Boolean checkSubjectEnable(CbsSubjectApiWrapper.CheckSubjectDto checkSubjectDto) {
         List<Subject> subjects = subjectService.getDao().queryCbsList(Lists.newArrayList(checkSubjectDto.getSubjectId().longValue()));
@@ -62,4 +66,9 @@ public class CbsSubjectServiceImpl implements CbsSubjectService {
         }
         return subjects;
     }
+
+    public List<Long> instrumentList(CbsSubjectApiWrapper.InstrumentQuery query){
+        List<Instrument> list = instrumentService.lambdaQuery().in(Instrument::getId, query.getMusicalInstrumentIds()).list();
+        return list.stream().map(e->e.getId().longValue()).collect(Collectors.toList());
+    }
 }

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

@@ -435,7 +435,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
         if(StringUtils.isNotEmpty(extConfigJson)){
             Integer multitrack = JSONObject.parseObject(extConfigJson).getInteger("multitrack");
             if(multitrack != null && multitrack > 1){
-                addMusicSheet.setMusicSheetType(EMusicSheetType.CONCERT);
+                addMusicSheet.setMusicSheetType(EMusicSheetType.SINGLE);
             }
         }
         if(addMusicSheet.getMusicSheetType() == null){
@@ -455,7 +455,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
         addMusicSheet.setAudioType(EAudioType.HOMEMODE);
         addMusicSheet.setAvailableType(EMusicAvailableType.ORG);
         addMusicSheet.setSourceType(EMusicSourceType.PLATFORM);
-        addMusicSheet.setStatus(true);
+        addMusicSheet.setStatus(from.getShowFlag() == 1);
 
         String tracks = "";
         // 伴奏,原音 扩展信息