Authored by zhaojun2

FIX BUG

... ... @@ -47,6 +47,8 @@ public class BrandIndexBaseService {
map.put("brand_keyword", MapUtils.getString(esMap, "brandKeyword", ""));
map.put("yoho_brand_id", MapUtils.getIntValue(esMap, "yohoBrandId", 0));
map.put("is_global", MapUtils.getString(esMap, "isGlobal", "N"));
//模糊搜索页 全球购用
map.put("shop_intro", "品牌官方授权");
return map;
}
... ...
... ... @@ -45,7 +45,7 @@ public class ShopsIndexBaseService extends BaseService {
map.put("blk_status", MapUtils.getIntValue(esMap, "blkStatus", 0));
map.put("check_status", MapUtils.getIntValue(esMap, "checkStatus", 0));
map.put("search_show_image", MapUtils.getString(esMap, "searchShowImage", ""));
map.put("shop_intro", MapUtils.getString(esMap, "shopIntro", ""));
map.put("shop_intro", MapUtils.getString(esMap, "shopIntro", "品牌官方授权"));
return map;
}
... ...
... ... @@ -136,8 +136,8 @@ public class FuzzySceneService extends AbstractPageSceneService {
if (!CollectionUtils.isEmpty(jsonArray)) {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject subJsonObject = jsonArray.getJSONObject(i);
JSONObject shopJsonObject = subJsonObject.getJSONObject("yoho_shop");
if (shopWithAdditionalImage.size() < 1 && StringUtils.isNotBlank(shopJsonObject.getString("search_show_image"))) {
JSONObject yohoShopJsonObject = subJsonObject.getJSONObject("yoho_shop");
if (yohoShopJsonObject != null && shopWithAdditionalImage.size() < 1 && StringUtils.isNotBlank(yohoShopJsonObject.getString("search_show_image"))) {
shopWithAdditionalImage.add(subJsonObject);
} else {
otherShops.add(subJsonObject);
... ... @@ -147,6 +147,12 @@ public class FuzzySceneService extends AbstractPageSceneService {
}
}
dataMap.put("shop_list_top", shopWithAdditionalImage);
//如果没有top 按原来样式
if (CollectionUtils.isEmpty(shopWithAdditionalImage)) {
dataMap.put("shop_list", otherShops);
return;
}
int page = getPage(paramMap);
int pageSize = 2;
List<JSONObject> subShopList = SearchCollectionUtils.safeSubList(otherShops, (page - 1) * pageSize, page * pageSize);
... ... @@ -165,7 +171,6 @@ public class FuzzySceneService extends AbstractPageSceneService {
int productListSize = productList == null ? 0 : productList.size();
subShopList = subShopList.stream().filter(e -> e.getIntValue("index") < productListSize).collect(Collectors.toList());
}
dataMap.put("shop_list", subShopList);
}
... ...