Commit d291d231 authored by 廖旭伟's avatar 廖旭伟

测试bug修改

parent 0f42fe88
...@@ -76,7 +76,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -76,7 +76,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
//过滤热门与非热门 //过滤热门与非热门
productList = productList.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList()); productList = productList.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList());
} }
productList = productList.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
productEntityResult.setList(productList); productEntityResult.setList(productList);
productEntityResult.setPageInfo(productCategoryResult.getPageInfo()); productEntityResult.setPageInfo(productCategoryResult.getPageInfo());
productEntityResult.setDict(productCategoryResult.getDict()); productEntityResult.setDict(productCategoryResult.getDict());
...@@ -90,6 +91,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -90,6 +91,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
//过滤热门与非热门 //过滤热门与非热门
productList = productList.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList()); productList = productList.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList());
} }
productList = productList.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
productEntityResult.setList(productList); productEntityResult.setList(productList);
productEntityResult.setPageInfo(companyProductEntityResult.getPageInfo()); productEntityResult.setPageInfo(companyProductEntityResult.getPageInfo());
productEntityResult.setDict(companyProductEntityResult.getDict()); productEntityResult.setDict(companyProductEntityResult.getDict());
...@@ -108,6 +111,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao, ...@@ -108,6 +111,8 @@ public class ProductServiceImpl extends AbstractCRUDCacheServiceImpl<ProductDao,
//过滤热门与非热门 //过滤热门与非热门
collect = collect.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList()); collect = collect.stream().filter(f -> f.getHot() == hot).collect(Collectors.toList());
} }
collect = collect.stream().sorted(Comparator.comparing(ProductEntity::getPublishTime).reversed())
.collect(Collectors.toList());
productEntityResult.setList(collect); productEntityResult.setList(collect);
pageInfo.setTotalResult(collect.size()); pageInfo.setTotalResult(collect.size());
productEntityResult.setPageInfo(pageInfo); productEntityResult.setPageInfo(pageInfo);
......
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