| Line 195... |
Line 195... |
| 195 |
UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
195 |
UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
| 196 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(uc.getUserId());
|
196 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(uc.getUserId());
|
| 197 |
RestClient rc = new RestClient();
|
197 |
RestClient rc = new RestClient();
|
| 198 |
Map<String, String> params = new HashMap<>();
|
198 |
Map<String, String> params = new HashMap<>();
|
| 199 |
List<String> mandatoryQ = new ArrayList<>();
|
199 |
List<String> mandatoryQ = new ArrayList<>();
|
| - |
|
200 |
if (queryTerm != null) {
|
| - |
|
201 |
mandatoryQ.add(String.format("+(%s)", queryTerm));
|
| - |
|
202 |
}
|
| 200 |
if (brand != null) {
|
203 |
if (brand != null) {
|
| 201 |
|
204 |
|
| 202 |
mandatoryQ.add(
|
205 |
mandatoryQ.add(
|
| 203 |
String.format("+(categoryId_i:%s) +(brand_ss:%s) +{!parent which=\"brand_ss:%s\"} tagId_i:(%s)",
|
206 |
String.format("+(categoryId_i:%s) +(brand_ss:%s) +{!parent which=\"brand_ss:%s\"} tagId_i:(%s)",
|
| 204 |
categoryId, brand, brand, StringUtils.join(tagIds, " ")));
|
207 |
categoryId, brand, brand, StringUtils.join(tagIds, " ")));
|
| 205 |
} else if (subCategoryId != null) {
|
208 |
} else if (subCategoryId != null) {
|
| 206 |
mandatoryQ
|
209 |
mandatoryQ
|
| 207 |
.add(String.format("+(subCategoryId_i:%s) +{!parent which=\"subCategoryId_i:%s\"} tagId_i:(%s)",
|
210 |
.add(String.format("+(subCategoryId_i:%s) +{!parent which=\"subCategoryId_i:%s\"} tagId_i:(%s)",
|
| 208 |
subCategoryId, subCategoryId, StringUtils.join(tagIds, " ")));
|
211 |
subCategoryId, subCategoryId, StringUtils.join(tagIds, " ")));
|
| 209 |
} else if (queryTerm != null) {
|
- |
|
| 210 |
mandatoryQ.add(String.format("+%s", queryTerm));
|
- |
|
| - |
|
212 |
|
| 211 |
} else if (hotDeal) {
|
213 |
} else if (hotDeal) {
|
| 212 |
mandatoryQ.add(String.format("+{!parent which=\"hot_deals_b=true\"} tagId_i:(%s)",
|
214 |
mandatoryQ.add(String.format("+{!parent which=\"hot_deals_b=true\"} tagId_i:(%s)",
|
| 213 |
StringUtils.join(tagIds, " ")));
|
215 |
StringUtils.join(tagIds, " ")));
|
| 214 |
} else {
|
216 |
} else {
|
| 215 |
mandatoryQ.add(
|
217 |
mandatoryQ.add(
|