fix: 增加获取购物车商品日志,修复可能出现的获取购物车空指针问题
This commit is contained in:
parent
0f2ed23b02
commit
0bf6aab43b
@ -214,15 +214,15 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
|
|||||||
|
|
||||||
List<Map<String, Object>> brandList = new ArrayList<>();
|
List<Map<String, Object>> brandList = new ArrayList<>();
|
||||||
if (CollUtil.isNotEmpty(brandIds)) {
|
if (CollUtil.isNotEmpty(brandIds)) {
|
||||||
brandList = this.brandService.getBrandsMapsByCategory(brandIds, "id,name,logo");
|
brandList = this.brandService.getBrandsMapsByCategory(CollUtil.distinct(brandIds), "id,name,logo");
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> categoryList = new ArrayList<>();
|
List<Map<String, Object>> categoryList = new ArrayList<>();
|
||||||
if (CollUtil.isNotEmpty(categoryList)) {
|
if (CollUtil.isNotEmpty(categoryPaths)) {
|
||||||
categoryList = this.categoryService.listMapsByIdsOrderByLevel(categoryPaths, "id,name");
|
categoryList = this.categoryService.listMapsByIdsOrderByLevel(CollUtil.distinct(categoryPaths), "id,name");
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> storeCategoryList = new ArrayList<>();
|
List<Map<String, Object>> storeCategoryList = new ArrayList<>();
|
||||||
if (CollUtil.isNotEmpty(storeCategoryList)) {
|
if (CollUtil.isNotEmpty(storeCategoryPaths)) {
|
||||||
storeCategoryList = this.storeGoodsLabelService.listMapsByStoreIds(storeCategoryPaths, "id,label_name");
|
storeCategoryList = this.storeGoodsLabelService.listMapsByStoreIds(CollUtil.distinct(storeCategoryPaths), "id,label_name");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (GoodsSkuDTO goodsSku : skuIPage.getRecords()) {
|
for (GoodsSkuDTO goodsSku : skuIPage.getRecords()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user