| Line 150... |
Line 150... |
| 150 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(userInfo.getUserId());
|
150 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(userInfo.getUserId());
|
| 151 |
RestClient rc = new RestClient(SchemeType.HTTP, "dtr", 8984);
|
151 |
RestClient rc = new RestClient(SchemeType.HTTP, "dtr", 8984);
|
| 152 |
Map<String, String> params = new HashMap<>();
|
152 |
Map<String, String> params = new HashMap<>();
|
| 153 |
List<String> mandatoryQ = new ArrayList<>();
|
153 |
List<String> mandatoryQ = new ArrayList<>();
|
| 154 |
if(brand != null) {
|
154 |
if(brand != null) {
|
| - |
|
155 |
|
| 155 |
mandatoryQ.add(String.format("+brand_s:%s", brand));
|
156 |
mandatoryQ.add(String.format("+{!parent which=\"brand_s=%s\"} tagId_i:(%s)", brand, tagIds));
|
| - |
|
157 |
} else {
|
| - |
|
158 |
mandatoryQ.add(String.format("+{!parent which=\"id:catalog*\"} tagId_i:(%s)", StringUtils.join(tagIds, " ")));
|
| 156 |
}
|
159 |
}
|
| 157 |
mandatoryQ.add(String.format("+{!parent which=\"id:catalog*\"}tagId_i:(%s)", StringUtils.join(tagIds, " OR ")));
|
- |
|
| 158 |
params.put("q", StringUtils.join(mandatoryQ," "));
|
160 |
params.put("q", StringUtils.join(mandatoryQ," "));
|
| 159 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
161 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
| 160 |
params.put("sort", "rank_i asc");
|
162 |
params.put("sort", "rank_i asc");
|
| 161 |
params.put("start", String.valueOf(offset));
|
163 |
params.put("start", String.valueOf(offset));
|
| 162 |
params.put("rows", String.valueOf(limit));
|
164 |
params.put("rows", String.valueOf(limit));
|