...
|
...
|
@@ -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);
|
|
|
}
|
|
|
|
...
|
...
|
|