Commit 81c9d72e by 田超

Merge branch 'feature/1005532' into 'master'

feat: [1005532] 0927慢sql优化

See merge request rays/pcloud-book!1423
parents 63596741 f0ae106c
......@@ -6802,9 +6802,10 @@ public class BookGroupBizImpl implements BookGroupBiz {
if (ObjectUtil.hasEmpty(reqDTO, reqDTO.getBookIds(), reqDTO.getAdviserIds(), reqDTO.getChannelIds(), reqDTO.getStart(), reqDTO.getEnd()))
return new ArrayList<>();
List<BookGroupDTO> bookGroupDTOS = bookGroupDao.listBookGroupIds(reqDTO.getBookIds(), reqDTO.getAdviserIds(), reqDTO.getChannelIds());
List<BookGroupDTO> bookGroupDTOS = bookGroupDao.listBookGroupIds(null, reqDTO.getAdviserIds(), reqDTO.getChannelIds());
if (CollUtil.isEmpty(bookGroupDTOS)) return new ArrayList<>();
bookGroupDTOS = bookGroupDTOS.stream().filter(e -> reqDTO.getBookIds().contains(e.getBookId())).collect(Collectors.toList());
if (CollUtil.isEmpty(bookGroupDTOS)) return new ArrayList<>();
List<Long> bookGroupIds = bookGroupDTOS.stream().filter(Objects::nonNull).map(BookGroupDTO::getId).filter(Objects::nonNull).distinct().collect(Collectors.toList());
if (CollUtil.isEmpty(bookGroupIds)) return new ArrayList<>();
Integer maxCount = 500;
......
......@@ -1286,11 +1286,11 @@
FROM
book_group
WHERE
book_id IN
<!-- book_id IN
<foreach collection="bookIds" open="(" item="item" separator="," close=")">
${item}
</foreach>
AND channel_id IN
AND -->channel_id IN
<foreach collection="channelIds" open="(" item="item" separator="," close=")">
${item}
</foreach>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment