| Line 210... |
Line 210... |
| 210 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
210 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
| 211 |
}
|
211 |
}
|
| 212 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
212 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
| 213 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
213 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
| 214 |
List<FofoCatalogResponse> dealResponse = getCatalogSingleSkuResponse(docs, itemIdsQtyMap, false);
|
214 |
List<FofoCatalogResponse> dealResponse = getCatalogSingleSkuResponse(docs, itemIdsQtyMap, false);
|
| 215 |
|
- |
|
| 216 |
|
215 |
|
| 217 |
dealResponse = dealResponse.stream()
|
- |
|
| 218 |
// .filter(x->itemIdsQtyMap.keySet().contains((int)(x.getItems().get(0).getItem_id())))
|
- |
|
| 219 |
.map(x -> {
|
- |
|
| 220 |
FofoAvailabilityInfo fai = x.getItems().get(0);
|
- |
|
| 221 |
fai.setAvailability(5);
|
- |
|
| 222 |
return x;
|
- |
|
| 223 |
}).collect(Collectors.toList());
|
- |
|
| 224 |
Bucket bucket = itemBucketService.getBuckets(Optional.of(true)).get(0);
|
216 |
Bucket bucket = itemBucketService.getBuckets(Optional.of(true)).stream().filter(x->x.getId()==id).collect(Collectors.toList()).get(0);
|
| 225 |
bucket.setFofoCatalogResponses(dealResponse);
|
217 |
bucket.setFofoCatalogResponses(dealResponse);
|
| 226 |
return responseSender.ok(bucket);
|
218 |
return responseSender.ok(bucket);
|
| 227 |
}
|
219 |
}
|
| 228 |
|
220 |
|
| 229 |
private String getCommaSeparateTags(int userId) {
|
221 |
private String getCommaSeparateTags(int userId) {
|