Skip to content

Commit

Permalink
有一个空品牌问题处理
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper711 committed Oct 28, 2021
1 parent 036ad56 commit 57594f3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private EsGoodsRelatedInfo convertToEsGoodsRelatedInfo(Map<String, Aggregation>


String categoryNamePath = categoryPath;
if (!categoryBuckets.isEmpty()) {
if (!categoryNameBuckets.isEmpty()) {
categoryNamePath = categoryNameBuckets.get(0).getKey().toString();
}
String[] split = ArrayUtil.distinct(categoryPath.split(","));
Expand Down Expand Up @@ -187,6 +187,10 @@ private EsGoodsRelatedInfo convertToEsGoodsRelatedInfo(Map<String, Aggregation>
if (brandBuckets != null && !brandBuckets.isEmpty()) {
for (int i = 0; i < brandBuckets.size(); i++) {
String brandId = brandBuckets.get(i).getKey().toString();
//当商品品牌id为0时,代表商品没有选择品牌,所以过滤掉品牌选择器
if (brandId.equals("0")) {
continue;
}
if (CharSequenceUtil.isNotEmpty(goodsSearch.getBrandId())) {
List<String> brandList = Arrays.asList(goodsSearch.getBrandId().split("@"));
if (brandList.contains(brandId)) {
Expand Down

0 comments on commit 57594f3

Please sign in to comment.