| Line 574... |
Line 574... |
| 574 |
} catch (HttpHostConnectException e) {
|
574 |
} catch (HttpHostConnectException e) {
|
| 575 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
575 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
| 576 |
}
|
576 |
}
|
| 577 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
577 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
| 578 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
578 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
| 579 |
final Ordering<Integer> colorOrdering = Ordering.explicit(webProducts);
|
579 |
//final Ordering<Integer> colorOrdering = Ordering.explicit(webProducts);
|
| 580 |
List<FofoCatalogResponse> dealResponse = getCatalogResponse(docs, false, userInfo.getRetailerId()).stream()
|
580 |
List<FofoCatalogResponse> dealResponse = getCatalogResponse(docs, false, userInfo.getRetailerId());
|
| - |
|
581 |
/* .stream()
|
| 581 |
.sorted(new Comparator<FofoCatalogResponse>() {
|
582 |
.sorted(new Comparator<FofoCatalogResponse>() {
|
| 582 |
@Override
|
583 |
@Override
|
| 583 |
public int compare(FofoCatalogResponse o1, FofoCatalogResponse o2) {
|
584 |
public int compare(FofoCatalogResponse o1, FofoCatalogResponse o2) {
|
| 584 |
return colorOrdering.compare(o1.getCatalogId(), o2.getCatalogId());
|
585 |
return colorOrdering.compare(o1.getCatalogId(), o2.getCatalogId());
|
| 585 |
}
|
586 |
}
|
| 586 |
}).collect(Collectors.toList());
|
587 |
}).collect(Collectors.toList());*/
|
| 587 |
webListing.setFofoCatalogResponses(dealResponse);
|
588 |
webListing.setFofoCatalogResponses(dealResponse);
|
| 588 |
}
|
589 |
}
|
| 589 |
return responseSender.ok(webListings);
|
590 |
return responseSender.ok(webListings);
|
| 590 |
}
|
591 |
}
|
| 591 |
|
592 |
|