From b309f30d90526062d77514cb321a406e73b4a078 Mon Sep 17 00:00:00 2001 From: Gary Date: Wed, 7 Feb 2024 02:44:43 +0800 Subject: [PATCH] 1.fix sql issue --- .../src/main/java/com/luoo/music/service/TagService.java | 4 ++++ 1 file changed, 4 insertions(+) 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())));