Bläddra i källkod

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

# Conflicts:
#	pom.xml
zouxuan 1 år sedan
förälder
incheckning
8105131214

BIN
LOG_HOME_IS_UNDEFINED/202407/feign-20240715-0.log.gz


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

@@ -16,7 +16,6 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
-import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 @Service
 @Service
@@ -55,6 +54,7 @@ public class CbsSubjectServiceImpl implements CbsSubjectService {
                 List<InstrumentWrapper.Instrument> instruments = cbsSubject.getInstruments();
                 List<InstrumentWrapper.Instrument> instruments = cbsSubject.getInstruments();
                 if (CollectionUtils.isNotEmpty(instruments)) {
                 if (CollectionUtils.isNotEmpty(instruments)) {
                     subject.setSubjectName(instruments.stream().map(InstrumentWrapper.Instrument::getName).collect(Collectors.joining(",")));
                     subject.setSubjectName(instruments.stream().map(InstrumentWrapper.Instrument::getName).collect(Collectors.joining(",")));
+                    subject.setInstrumentId(instruments.get(0).getId().longValue());
                 }
                 }
             }
             }
         }
         }

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

@@ -173,7 +173,6 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
 
 
     public void initMusicSheetVo(SysMusicScore record,CbsMusicSheetWrapper.MusicSheetApplication musicSheetApplication
     public void initMusicSheetVo(SysMusicScore record,CbsMusicSheetWrapper.MusicSheetApplication musicSheetApplication
             ,Map<Integer,CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto> musicalInstrumentQueryMap,Map<Integer, String> categoriesMap){
             ,Map<Integer,CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto> musicalInstrumentQueryMap,Map<Integer, String> categoriesMap){
-        record.setSubjectName(musicSheetApplication.getSubjectNames());
         record.setRankIds(StringUtils.equals("FREE",musicSheetApplication.getPaymentType()) ? "" : "1");
         record.setRankIds(StringUtils.equals("FREE",musicSheetApplication.getPaymentType()) ? "" : "1");
         record.setCbsMusicSheetId(musicSheetApplication.getId().toString());
         record.setCbsMusicSheetId(musicSheetApplication.getId().toString());
         record.setPlayMode(SysMusicScore.PlayMode.valueOf(musicSheetApplication.getPlayMode().getCode()));
         record.setPlayMode(SysMusicScore.PlayMode.valueOf(musicSheetApplication.getPlayMode().getCode()));
@@ -203,18 +202,22 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
         record.setOrder(musicSheetApplication.getSortNo());
         record.setOrder(musicSheetApplication.getSortNo());
         record.setEnableEvaluation(musicSheetApplication.getIsEvaluated());
         record.setEnableEvaluation(musicSheetApplication.getIsEvaluated());
         record.setIsOpenMetronome(musicSheetApplication.getIsUseSystemBeat() && musicSheetApplication.getIsPlayBeat());
         record.setIsOpenMetronome(musicSheetApplication.getIsUseSystemBeat() && musicSheetApplication.getIsPlayBeat());
-        if(StringUtils.isNotEmpty(musicSheetApplication.getMusicalInstrumentIds())){
-            String[] split = musicSheetApplication.getMusicalInstrumentIds().split(",");
-            for (String s : split) {
-                StringBuffer sb = new StringBuffer();
-                CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto musicalInstrumentQueryDto = musicalInstrumentQueryMap.get(Integer.parseInt(s));
-                if(Objects.nonNull(musicalInstrumentQueryDto)){
-                    if(sb.length() > 0){
-                        sb.append(",");
+        if(musicSheetApplication.getMusicSheetType() == EMusicSheetType.CONCERT){
+            record.setSubjectName("");
+        }else {
+            if(StringUtils.isNotEmpty(musicSheetApplication.getMusicalInstrumentIds())){
+                String[] split = musicSheetApplication.getMusicalInstrumentIds().split(",");
+                for (String s : split) {
+                    StringBuffer sb = new StringBuffer();
+                    CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto musicalInstrumentQueryDto = musicalInstrumentQueryMap.get(Integer.parseInt(s));
+                    if(Objects.nonNull(musicalInstrumentQueryDto)){
+                        if(sb.length() > 0){
+                            sb.append(",");
+                        }
+                        sb.append(musicalInstrumentQueryDto.getName());
                     }
                     }
-                    sb.append(musicalInstrumentQueryDto.getName());
+                    record.setSubjectName(sb.toString());
                 }
                 }
-                record.setSubjectName(sb.toString());
             }
             }
         }
         }
     }
     }

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/SysMusicScoreMapper.xml

@@ -177,7 +177,7 @@
 		</if>
 		</if>
 	</select>
 	</select>
 	<select id="selectSyncPage" resultMap="SysMusicScore">
 	<select id="selectSyncPage" resultMap="SysMusicScore">
-		select * from sys_music_score where cbs_music_sheet_id_ iS NOT NULL and del_flag_ = 0 and show_flag_ = 1 AND client_type_ = 'SMART_PRACTICE'
+		select * from sys_music_score where cbs_music_sheet_id_ iS NOT NULL and del_flag_ = 0 AND client_type_ = 'SMART_PRACTICE'
 	</select>
 	</select>
 
 
 	<update id="updateBatchByCbsId">
 	<update id="updateBatchByCbsId">
@@ -258,10 +258,10 @@
 				AND ses.show_flag_ = #{showFlag}
 				AND ses.show_flag_ = #{showFlag}
 			</if>
 			</if>
 			<if test="subjectId != null">
 			<if test="subjectId != null">
-				AND (smsa.subject_id_ = #{subjectId} or smsa.subject_id_ is null)
+				AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '')
 			</if>
 			</if>
 			<if test="subjectIds != null and subjectIds != ''">
 			<if test="subjectIds != null and subjectIds != ''">
-				AND FIND_IN_SET(#{subjectIds},ses.subject_ids_)
+				AND (FIND_IN_SET(#{subjectIds},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '')
 			</if>
 			</if>
 			<if test="clientType != null">
 			<if test="clientType != null">
 				AND ses.client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 				AND ses.client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}

+ 1 - 1
pom.xml

@@ -26,7 +26,7 @@
 		<docker.registry.repository>127.0.0.1:5000</docker.registry.repository>
 		<docker.registry.repository>127.0.0.1:5000</docker.registry.repository>
 		<docker.maven.plugin.version>1.2.2</docker.maven.plugin.version>
 		<docker.maven.plugin.version>1.2.2</docker.maven.plugin.version>
 		<com.microsvc.toolkit.version>1.0.7</com.microsvc.toolkit.version>
 		<com.microsvc.toolkit.version>1.0.7</com.microsvc.toolkit.version>
-		<cbs.version>1.0.10</cbs.version>
+		<cbs.version>1.0.11</cbs.version>
 	</properties>
 	</properties>
 
 
 	<dependencyManagement>
 	<dependencyManagement>