| Line 237... |
Line 237... |
| 237 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
237 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
| 238 |
}
|
238 |
}
|
| 239 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
239 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
| 240 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
240 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
| 241 |
dealResponse = getCatalogResponse(docs, hotDeal);
|
241 |
dealResponse = getCatalogResponse(docs, hotDeal);
|
| 242 |
if (Mongo.EMAIL_BLOCKED_BRANDS.containsKey(userInfo.getEmail())) {
|
242 |
if (Mongo.PARTNER_BLoCKED_BRANDS.containsKey(userInfo.getEmail())) {
|
| 243 |
dealResponse.stream()
|
243 |
dealResponse.stream()
|
| 244 |
.filter(x -> Mongo.EMAIL_BLOCKED_BRANDS.get(userInfo.getEmail()).contains(x.getBrand()));
|
244 |
.filter(x -> Mongo.PARTNER_BLoCKED_BRANDS.get(userInfo.getEmail()).contains(x.getBrand()));
|
| 245 |
}
|
245 |
}
|
| 246 |
} else {
|
246 |
} else {
|
| 247 |
return responseSender.badRequest(
|
247 |
return responseSender.badRequest(
|
| 248 |
new ProfitMandiBusinessException("Retailer id", userInfo.getUserId(), "NOT_FOFO_RETAILER"));
|
248 |
new ProfitMandiBusinessException("Retailer id", userInfo.getUserId(), "NOT_FOFO_RETAILER"));
|
| 249 |
}
|
249 |
}
|