...
|
...
|
@@ -38,6 +38,15 @@ public class UfoProductIndexBaseService { |
|
|
return results;
|
|
|
}
|
|
|
|
|
|
|
|
|
public List<Map<String, Object>> buildProductReturnInfoList(List<Map<String, Object>> productEsSourceList) {
|
|
|
List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();
|
|
|
for (Map<String, Object> productEsSource : productEsSourceList) {
|
|
|
results.add(this.getProductMapFromEsSource(productEsSource));
|
|
|
}
|
|
|
return results;
|
|
|
}
|
|
|
|
|
|
public Map<String, Object> getProductMapFromEsSource(Map<String, Object> map) {
|
|
|
Map<String, Object> productMap = new HashMap<String, Object>();
|
|
|
productMap.put("id", MapUtils.getIntValue(map, UfoProductIndexEsField.id, 0));
|
...
|
...
|
@@ -47,12 +56,18 @@ public class UfoProductIndexBaseService { |
|
|
return productMap;
|
|
|
}
|
|
|
|
|
|
public List<Map<String, Object>> buildProductReturnInfoList(List<Map<String, Object>> productEsSourceList) {
|
|
|
public List<Map<String, Object>> buildSuggestReturnInfoList(List<Map<String, Object>> productEsSourceList) {
|
|
|
List<Map<String, Object>> results = new ArrayList<Map<String, Object>>();
|
|
|
for (Map<String, Object> productEsSource : productEsSourceList) {
|
|
|
results.add(this.getProductMapFromEsSource(productEsSource));
|
|
|
results.add(this.getSuggestFromEsSource(productEsSource));
|
|
|
}
|
|
|
return results;
|
|
|
}
|
|
|
|
|
|
public Map<String, Object> getSuggestFromEsSource(Map<String, Object> map) {
|
|
|
Map<String, Object> productMap = new HashMap<String, Object>();
|
|
|
productMap.put("product_name", MapUtils.getString(map, UfoProductIndexEsField.productName, ""));
|
|
|
return productMap;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|