|
@@ -72,13 +72,14 @@ public class SknImgsCacheBean extends AbstractCacheBean<SknImgsResquest, SknImgs |
|
@@ -72,13 +72,14 @@ public class SknImgsCacheBean extends AbstractCacheBean<SknImgsResquest, SknImgs |
72
|
|
72
|
|
73
|
if (searchResult != null && CollectionUtils.isNotEmpty(searchResult.getResultList())) {
|
73
|
if (searchResult != null && CollectionUtils.isNotEmpty(searchResult.getResultList())) {
|
74
|
Map<String, SknImgsResponse> defaultImgTempMap = new HashMap<>();
|
74
|
Map<String, SknImgsResponse> defaultImgTempMap = new HashMap<>();
|
75
|
- for (Map<String, Object> image : searchResult.getResultList()) {
|
75
|
+ for (Map<String, Object> product : searchResult.getResultList()) {
|
76
|
SknImgsResponse response = new SknImgsResponse();
|
76
|
SknImgsResponse response = new SknImgsResponse();
|
77
|
- response.setDefault_images(MapUtils.getString(image, "defaultImages", ""));
|
|
|
78
|
- response.setSkn_default_img(MapUtils.getString(image, "sknDefaultImg", ""));
|
|
|
79
|
- List<JSONObject> goodsList = JSON.parseObject(JSON.toJSONString(image.get("goodsList")), new TypeReference<List<JSONObject>>() {});
|
77
|
+ response.setDefault_images(MapUtils.getString(product, ProductIndexEsField.defaultImages, ""));
|
|
|
78
|
+ response.setSkn_default_img(MapUtils.getString(product, ProductIndexEsField.sknDefaultImg, ""));
|
|
|
79
|
+ response.setGender(MapUtils.getString(product, ProductIndexEsField.gender, ""));
|
|
|
80
|
+ List<JSONObject> goodsList = JSON.parseObject(JSON.toJSONString(product.get(ProductIndexEsField.goodsList)), new TypeReference<List<JSONObject>>() {});
|
80
|
sknImgHelper.genImage(goodsList, response);
|
81
|
sknImgHelper.genImage(goodsList, response);
|
81
|
- defaultImgTempMap.put(MapUtils.getString(image,"productSkn",""), response);
|
82
|
+ defaultImgTempMap.put(MapUtils.getString(product,ProductIndexEsField.productSkn,""), response);
|
82
|
}
|
83
|
}
|
83
|
for (SknImgsRequestResponse requestResponse : missCacheRequests) {
|
84
|
for (SknImgsRequestResponse requestResponse : missCacheRequests) {
|
84
|
results.put(requestResponse.getRequest(), defaultImgTempMap.get(requestResponse.getRequest().getProductSkn().toString()));
|
85
|
results.put(requestResponse.getRequest(), defaultImgTempMap.get(requestResponse.getRequest().getProductSkn().toString()));
|