Subversion Repositories SmartDukaan

Rev

Rev 25959 | Rev 25967 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25959 Rev 25966
Line 191... Line 191...
191
		Map<Integer, Integer> itemIdsQtyMap = iqPojo.stream().collect(Collectors.toMap(x->x.getItemId(), x->x.getQuantity()));
191
		Map<Integer, Integer> itemIdsQtyMap = iqPojo.stream().collect(Collectors.toMap(x->x.getItemId(), x->x.getQuantity()));
192
		Set<Integer> catalogIds = itemRepository.selectByIds(itemIdsQtyMap.keySet()).stream().map(x->x.getCatalogItemId()).collect(Collectors.toSet());
192
		Set<Integer> catalogIds = itemRepository.selectByIds(itemIdsQtyMap.keySet()).stream().map(x->x.getCatalogItemId()).collect(Collectors.toSet());
193
		RestClient rc = new RestClient();
193
		RestClient rc = new RestClient();
194
		Map<String, String> params = new HashMap<>();
194
		Map<String, String> params = new HashMap<>();
195
		List<String> mandatoryQ = new ArrayList<>();
195
		List<String> mandatoryQ = new ArrayList<>();
196
		mandatoryQ.add(String.format("+{!parent which=\"id:catalog*\"} catalogId_i:(%s)", StringUtils.join(catalogIds, " ")));
196
		mandatoryQ.add(String.format("+catalogId_i:(%s) +{!parent which=\"id:catalog*\"}", StringUtils.join(catalogIds, " ")));
197
		params.put("start", "0");
197
		params.put("start", "0");
198
		params.put("rows", "100");
198
		params.put("rows", "100");
199
		params.put("q", StringUtils.join(mandatoryQ, " "));
199
		params.put("q", StringUtils.join(mandatoryQ, " "));
200
		params.put("fl", "*, [child parentFilter=id:catalog*]");
200
		params.put("fl", "*, [child parentFilter=id:catalog*]");
201
 
201