liujunchi 2 年之前
父节点
当前提交
6f97724aee

+ 9 - 6
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/MusicSheetServiceImpl.java

@@ -390,6 +390,7 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
                                             .map(Long::parseLong)
                                           .collect(Collectors.toList());
 
+
             List<Subject> subjectList = subjectService.findBySubjectByIdList(collect);
             if (CollectionUtils.isNotEmpty(subjectList)) {
                 Map<Long, String> subjectMap = subjectList.stream()
@@ -409,12 +410,14 @@ public class MusicSheetServiceImpl extends ServiceImpl<MusicSheetDao, MusicSheet
                              .filter(StringUtils::isNotEmpty)
                              .map(Long::parseLong)
                              .collect(Collectors.toList());
-
-            List<MusicTag> list = musicTagService.lambdaQuery()
-                                                 .in(MusicTag::getId, collect)
-                                                 .eq(MusicTag::getDelFlag, 0)
-                                                 .eq(MusicTag::getState, 1)
-                                                 .list();
+            List<MusicTag> list = new ArrayList<>();
+            if (CollectionUtils.isNotEmpty(collect)) {
+                list = musicTagService.lambdaQuery()
+                                      .in(MusicTag::getId, collect)
+                                      .eq(MusicTag::getDelFlag, 0)
+                                      .eq(MusicTag::getState, 1)
+                                      .list();
+            }
             if (CollectionUtils.isNotEmpty(list)) {
                 Map<Long, String> tagMap = list.stream()
                                                           .collect(Collectors.toMap(MusicTag::getId, MusicTag::getName));