...
|
...
|
@@ -33,7 +33,7 @@ public class ShopProductCacheBean extends AbstractCacheBean<ShopProductRequest, |
|
|
private BrandIndexBaseService brandIndexBaseService;
|
|
|
|
|
|
public List<ShopProductResponse> getShopSknByShopId(List<ShopProductRequest> shopSknRequests, String hrShopIds) {
|
|
|
final List<ShopProductRequestResponse> shopSknRequestResponses = new ArrayList<>();
|
|
|
List<ShopProductRequestResponse> shopSknRequestResponses = new ArrayList<>();
|
|
|
for (ShopProductRequest request : shopSknRequests) {
|
|
|
shopSknRequestResponses.add(new ShopProductRequestResponse(request));
|
|
|
}
|
...
|
...
|
@@ -64,7 +64,6 @@ public class ShopProductCacheBean extends AbstractCacheBean<ShopProductRequest, |
|
|
}
|
|
|
//2、执行搜索
|
|
|
List<SearchResult> searchResults = searchCommonService.doMutiSearch(ISearchConstants.INDEX_NAME_PRODUCT_INDEX, searchParams);
|
|
|
|
|
|
Set<Integer> brandIds = new HashSet<>();
|
|
|
for (SearchResult searchResult : searchResults) {
|
|
|
List<Map<String, Object>> resultList = searchResult.getResultList();
|
...
|
...
|
@@ -87,13 +86,13 @@ public class ShopProductCacheBean extends AbstractCacheBean<ShopProductRequest, |
|
|
for (int i = 0; i < missCacheRequests.size(); i++) {
|
|
|
ShopProductRequest request = missCacheRequests.get(i).getRequest();
|
|
|
List<Map<String, Object>> productList = shopProductListMap.get(request.getShopId().toString());
|
|
|
ShopProductResponse response = buildResonse(productList, brandMap, request);
|
|
|
ShopProductResponse response = buildResponse(productList, brandMap, request);
|
|
|
results.put(request, response);
|
|
|
}
|
|
|
return results;
|
|
|
}
|
|
|
|
|
|
private ShopProductResponse buildResonse(List<Map<String, Object>> productList, Map<String, Map<String, Object>> brandMap, ShopProductRequest request) {
|
|
|
private ShopProductResponse buildResponse(List<Map<String, Object>> productList, Map<String, Map<String, Object>> brandMap, ShopProductRequest request) {
|
|
|
ShopProductResponse response = new ShopProductResponse();
|
|
|
List<ShopProductResponse.ShopProduct> shopProductList = new ArrayList<>();
|
|
|
response.setShop_id(request.getShopId());
|
...
|
...
|
|