|
|
|
@ -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<String, List<String>> getTagMap(List<String> journalIds) {
|
|
|
|
|
if(journalIds.isEmpty()) {
|
|
|
|
|
return Collections.emptyMap();
|
|
|
|
|
}
|
|
|
|
|
List<Object[]> pairs = tagDao.getJounralId2TagPairs(journalIds);
|
|
|
|
|
return pairs.stream().collect(Collectors.groupingBy(s -> s[0].toString(),
|
|
|
|
|
Collectors.mapping(s -> s[1].toString(), Collectors.toList())));
|
|
|
|
|