Commit a197a13e authored by shiyu's avatar shiyu

首页置顶商品重复问题修复

parent 6950ee5f
...@@ -1273,9 +1273,11 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -1273,9 +1273,11 @@ public class SupplierItemServiceImpl implements SupplierItemService {
searchDto.setPage(1); searchDto.setPage(1);
List<SupplierItem> supplierItemList = supplierItemDao.findForHomePage(searchDto); List<SupplierItem> supplierItemList = supplierItemDao.findForHomePage(searchDto);
PageInfo<SupplierItem> pageInfo = new PageInfo(supplierItemList); PageInfo<SupplierItem> pageInfo = new PageInfo(supplierItemList);
SupplierItem topSupplierItem = supplierItemDao.findTopItem(); if (dto.getPage() == 1) {
if (topSupplierItem != null) { SupplierItem topSupplierItem = supplierItemDao.findTopItem();
supplierItemList.add(0, topSupplierItem); if (topSupplierItem != null) {
supplierItemList.add(0, topSupplierItem);
}
} }
List<Long> filterItemIds = supplierItemList.stream().map(SupplierItem::getId).collect(Collectors.toList()); List<Long> filterItemIds = supplierItemList.stream().map(SupplierItem::getId).collect(Collectors.toList());
if (redisUtils.hasKey(viewKey)) { if (redisUtils.hasKey(viewKey)) {
......
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