Subversion Repositories SmartDukaan

Rev

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

Rev 26515 Rev 26573
Line 203... Line 203...
203
		params.put("fl", "*, [child parentFilter=id:catalog*]");
203
		params.put("fl", "*, [child parentFilter=id:catalog*]");
204
 
204
 
205
		params.put("wt", "json");
205
		params.put("wt", "json");
206
		String response = null;
206
		String response = null;
207
		try {
207
		try {
208
			response = rc.get(SchemeType.HTTP, "dtr", 8984, "solr/demo/select", params);
208
			response = rc.get(SchemeType.HTTP, "50.116.10.120", 8984, "solr/demo/select", params);
209
		} catch (HttpHostConnectException e) {
209
		} catch (HttpHostConnectException e) {
210
			throw new ProfitMandiBusinessException("", "", "Could not connect to host");
210
			throw new ProfitMandiBusinessException("", "", "Could not connect to host");
211
		}
211
		}
212
		JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
212
		JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
213
		JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
213
		JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
Line 563... Line 563...
563
						int itemId = childItem.getInt("itemId_i");
563
						int itemId = childItem.getInt("itemId_i");
564
						itemsSet.add(itemId);
564
						itemsSet.add(itemId);
565
					}
565
					}
566
				}
566
				}
567
			}
567
			}
-
 
568
			if(itemsSet.size() > 0) {
-
 
569
				return dealResponse;
-
 
570
			}
568
			itemTagListingMap = tagListingRepository.selectByItemIdsAndTagIds(itemsSet, new HashSet<>(tagIds)).stream()
571
			itemTagListingMap = tagListingRepository.selectByItemIdsAndTagIds(itemsSet, new HashSet<>(tagIds)).stream()
569
					.collect(Collectors.toMap(x -> x.getItemId(), x -> x));
572
					.collect(Collectors.toMap(x -> x.getItemId(), x -> x));
570
		}
573
		}
571
 
574
 
572
		for (int i = 0; i < docs.length(); i++) {
575
		for (int i = 0; i < docs.length(); i++) {