diff --git a/luoo_music/src/main/java/com/luoo/music/service/TagService.java b/luoo_music/src/main/java/com/luoo/music/service/TagService.java index 9a828e2..c047971 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/TagService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/TagService.java @@ -1,5 +1,6 @@ package com.luoo.music.service; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -28,6 +29,9 @@ public class TagService { } public Map> getTagMap(List journalIds) { + if(journalIds.isEmpty()) { + return Collections.emptyMap(); + } List pairs = tagDao.getJounralId2TagPairs(journalIds); return pairs.stream().collect(Collectors.groupingBy(s -> s[0].toString(), Collectors.mapping(s -> s[1].toString(), Collectors.toList())));