...
|
...
|
@@ -34,8 +34,9 @@ public class ProductIndexBaseService { |
|
|
productMap.put("product_name", map.getOrDefault(ProductIndexEsField.productName, ""));
|
|
|
productMap.put("product_skn", map.get(ProductIndexEsField.productSkn));
|
|
|
productMap.put("cn_alphabet", map.getOrDefault(ProductIndexEsField.cnAlphabet, ""));
|
|
|
|
|
|
productMap.put("brand_id", map.get(ProductIndexEsField.brandId));
|
|
|
|
|
|
Integer brand_id = (Integer)map.getOrDefault(ProductIndexEsField.brandId,0);
|
|
|
productMap.put("brand_id", brand_id);
|
|
|
productMap.put("brand_name", map.getOrDefault(ProductIndexEsField.brandName, ""));
|
|
|
productMap.put("brand_domain", map.get(ProductIndexEsField.brandDomain));
|
|
|
productMap.put("country_id", map.get(ProductIndexEsField.countryId));
|
...
|
...
|
@@ -99,13 +100,15 @@ public class ProductIndexBaseService { |
|
|
productMap.put("is_student_rebate", map.getOrDefault(ProductIndexEsField.isstudentrebate, "N"));
|
|
|
|
|
|
// 全球购相关
|
|
|
productMap.put("is_global", map.getOrDefault(ProductIndexEsField.isGlobal, "N"));
|
|
|
String is_global = (String)map.getOrDefault(ProductIndexEsField.isGlobal, "N");
|
|
|
productMap.put("is_global", is_global);
|
|
|
Integer tbl_country_id = 0;
|
|
|
try {
|
|
|
tbl_country_id = (Integer) map.get(ProductIndexEsField.tblCountryId);
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
productMap.put("tbl_country_id", tbl_country_id);
|
|
|
productMap.put("tbl_brand_id", "Y".equalsIgnoreCase(is_global)?brand_id*(-1):0);//全球购品牌id改为正数
|
|
|
productMap.put("tbl_country_name", map.get(ProductIndexEsField.tblCountryName));
|
|
|
String tbl_plane = (tbl_country_id != null && tbl_country_id != 86) ? "Y" : "N";
|
|
|
productMap.put("tbl_plane", tbl_plane);
|
...
|
...
|
@@ -172,8 +175,7 @@ public class ProductIndexBaseService { |
|
|
result.put("product_price_plan_list", productPricePlanMap.get("" + productEsSource.get("productSkn")));
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取商品列表[并返回变价计划]
|
|
|
*
|
...
|
...
|
@@ -182,7 +184,7 @@ public class ProductIndexBaseService { |
|
|
*/
|
|
|
public Map<String, Map<String, Object>> getProductMapWithPricePlan(Map<String, Map<String, Object>> productMap) {
|
|
|
List<String> allProductSkns = new ArrayList<String>();
|
|
|
for (Map.Entry<String,Map<String, Object>> entry : productMap.entrySet()) {
|
|
|
for (Map.Entry<String, Map<String, Object>> entry : productMap.entrySet()) {
|
|
|
allProductSkns.add(entry.getValue().getOrDefault("productSkn", "").toString());
|
|
|
}
|
|
|
// 每个skn对应的变价计划列表
|
...
|
...
|
@@ -190,7 +192,7 @@ public class ProductIndexBaseService { |
|
|
.toArray(new String[allProductSkns.size()]));
|
|
|
// 改变List<Map<String, Object>的值
|
|
|
Map<String, Map<String, Object>> results = new HashMap<String, Map<String, Object>>();
|
|
|
for (Map.Entry<String,Map<String, Object>> entry : productMap.entrySet()) {
|
|
|
for (Map.Entry<String, Map<String, Object>> entry : productMap.entrySet()) {
|
|
|
results.put(entry.getKey(), this.fillProductMapWithPricePlan(entry.getValue(), productPricePlanMap));
|
|
|
}
|
|
|
return results;
|
...
|
...
|
|