From 79f667451cdb7a80130a87f7d4c231d7497670ed Mon Sep 17 00:00:00 2001 From: Gary Date: Wed, 7 Feb 2024 02:39:18 +0800 Subject: [PATCH] 1.speed up query --- .../java/com/luoo/music/controller/JournalController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java b/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java index eaad5a1..3fb13c2 100644 --- a/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java +++ b/luoo_music/src/main/java/com/luoo/music/controller/JournalController.java @@ -111,7 +111,7 @@ public class JournalController { List pageList = journalService.orderByField(objectIds); Set journalCollectSet = new HashSet<>(objectIds); Map> tagMap=tagService.getTagMap(objectIds); - List list = pageList.stream().map(a -> JournalMapper.getJournalRespDTO(a, journalCollectSet,mongoTemplate,redisTemplate,commentDao,tagMap)) + List list = pageList.stream().map(a -> JournalMapper.getJournalRespDTO(a, journalCollectSet,tagMap)) .collect(Collectors.toList()); return Result.success(new PageResult(Long.valueOf(list.size()), list)); } @@ -176,7 +176,7 @@ public class JournalController { Set journalCollectSet = null == user ? Collections.emptySet() : userCollectInfoService.getCollectSet(user.getUserId(),ids, CollectTypeEnum.JOURNAL); Map> tagMap=tagService.getTagMap(ids); - List list = journals.stream().map(a -> JournalMapper.getJournalRespDTO(a, journalCollectSet,mongoTemplate,redisTemplate,commentDao,tagMap)) + List list = journals.stream().map(a -> JournalMapper.getJournalRespDTO(a, journalCollectSet,tagMap)) .collect(Collectors.toList()); return Result.success(list);