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