Commit a197a13e authored by shiyu's avatar shiyu

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

parent 6950ee5f
...@@ -1273,10 +1273,12 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -1273,10 +1273,12 @@ 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);
if (dto.getPage() == 1) {
SupplierItem topSupplierItem = supplierItemDao.findTopItem(); SupplierItem topSupplierItem = supplierItemDao.findTopItem();
if (topSupplierItem != null) { if (topSupplierItem != null) {
supplierItemList.add(0, topSupplierItem); 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)) {
List<Long> searchItemIds = (List<Long>) redisUtils.get(viewKey); List<Long> searchItemIds = (List<Long>) redisUtils.get(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