...
|
...
|
@@ -560,12 +560,30 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
if (filterData != null) {
|
|
|
List<FilterItem> filterItems = new ArrayList<>();
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(filterData.getJSONArray("maxSort"))) {
|
|
|
JSONArray preSaleFlagArray = filterData.getJSONArray("maxSort");
|
|
|
FilterItem preSaleFlagFilterItem = new FilterItem();
|
|
|
preSaleFlagFilterItem.setFilterId("maxSort");
|
|
|
preSaleFlagFilterItem.setFilterName("品类");
|
|
|
preSaleFlagFilterItem.setMultiSelect(true);
|
|
|
|
|
|
List<FilterItem.Item> itemList = new ArrayList<>();
|
|
|
for (Object sort : preSaleFlagArray) {
|
|
|
FilterItem.Item item = new FilterItem.Item();
|
|
|
item.setItemName(((JSONObject)sort).getString("sort_name"));
|
|
|
item.setItemId(((JSONObject)sort).getString("id"));
|
|
|
itemList.add(item);
|
|
|
}
|
|
|
preSaleFlagFilterItem.setItemList(itemList);
|
|
|
filterItems.add(preSaleFlagFilterItem);
|
|
|
}
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(filterData.getJSONArray("preSaleFlag"))) {
|
|
|
JSONArray preSaleFlagArray = filterData.getJSONArray("preSaleFlag");
|
|
|
FilterItem preSaleFlagFilterItem = new FilterItem();
|
|
|
preSaleFlagFilterItem.setFilterId("preSaleFlag");
|
|
|
preSaleFlagFilterItem.setFilterName("新旧程度");
|
|
|
preSaleFlagFilterItem.setMultiSelect(false);
|
|
|
preSaleFlagFilterItem.setMultiSelect(true);
|
|
|
|
|
|
List<FilterItem.Item> itemList = new ArrayList<>();
|
|
|
for (Object sort : preSaleFlagArray) {
|
...
|
...
|
@@ -601,7 +619,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
FilterItem sizeFilterItem = new FilterItem();
|
|
|
sizeFilterItem.setFilterId("size");
|
|
|
sizeFilterItem.setFilterName("尺码");
|
|
|
sizeFilterItem.setMultiSelect(false);
|
|
|
sizeFilterItem.setMultiSelect(true);
|
|
|
|
|
|
List<FilterItem.Item> itemList = new ArrayList<>();
|
|
|
for (Object size : sizeArray) {
|
...
|
...
|
@@ -643,7 +661,7 @@ public class ProductSearchServiceImpl implements ProductSearchService { |
|
|
FilterItem brandFilterItem = new FilterItem();
|
|
|
brandFilterItem.setFilterId("brand");
|
|
|
brandFilterItem.setFilterName("品牌");
|
|
|
brandFilterItem.setMultiSelect(false);
|
|
|
brandFilterItem.setMultiSelect(true);
|
|
|
|
|
|
List<FilterItem.Item> itemList = new ArrayList<>();
|
|
|
String brandLogo;
|
...
|
...
|
|