Subversion Repositories SmartDukaan

Rev

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

Rev 26718 Rev 26720
Line 156... Line 156...
156
			1022025, 1003800, 1022322, 1022307, 1022304, 1022004, 1022004, 1021934, 1021897, 1021768));
156
			1022025, 1003800, 1022322, 1022307, 1022304, 1022004, 1022004, 1021934, 1021897, 1021768));
157
 
157
 
158
	private Set<Integer> latestArrivals = new HashSet<>(Arrays.asList(1022382, 1022335, 1022381, 1022386, 1022380,
158
	private Set<Integer> latestArrivals = new HashSet<>(Arrays.asList(1022382, 1022335, 1022381, 1022386, 1022380,
159
			1022377, 1022376, 1022375, 1022374, 1022373, 1022372, 1022371, 1022370));
159
			1022377, 1022376, 1022375, 1022374, 1022373, 1022372, 1022371, 1022370));
160
 
160
 
-
 
161
	private Set<Integer> healthGadgets = new HashSet<>(Arrays.asList(1022383, 1022384));
-
 
162
	
161
	private Set<Integer> topGadgets = new HashSet<>(Arrays.asList(1022167, 1022174, 1022177, 1022184, 1022185, 1022359,
163
	private Set<Integer> topGadgets = new HashSet<>(Arrays.asList(1022167, 1022174, 1022177, 1022184, 1022185, 1022359,
162
			1022359, 1022359, 1022369, 1022369, 1022369, 1022361, 1022361, 1022361, 1022361, 1022368, 1022368, 1022368,
164
			1022359, 1022359, 1022369, 1022369, 1022369, 1022361, 1022361, 1022361, 1022361, 1022368, 1022368, 1022368,
163
			1022368, 1021443, 1021439, 1021440, 1021441, 1022313, 1022312, 1022311));
165
			1022368, 1021443, 1021439, 1021440, 1021441, 1022313, 1022312, 1022311));
164
 
166
 
-
 
167
	
165
	@ApiImplicitParams({
168
	@ApiImplicitParams({
166
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
169
			@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
167
	@RequestMapping(value = "/store/fofo", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
170
	@RequestMapping(value = "/store/fofo", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
168
	public ResponseEntity<?> getFofo(HttpServletRequest request,
171
	public ResponseEntity<?> getFofo(HttpServletRequest request,
169
			@RequestParam(value = "categoryId", required = false, defaultValue = "(3 OR 6)") String categoryId,
172
			@RequestParam(value = "categoryId", required = false, defaultValue = "(3 OR 6)") String categoryId,
Line 318... Line 321...
318
		Set<Integer> catalogIds = this.bestSellers;
321
		Set<Integer> catalogIds = this.bestSellers;
319
		if (tag.equalsIgnoreCase("latestArrivals")) {
322
		if (tag.equalsIgnoreCase("latestArrivals")) {
320
			catalogIds = this.latestArrivals;
323
			catalogIds = this.latestArrivals;
321
		} else if (tag.equalsIgnoreCase("topGadgets")) {
324
		} else if (tag.equalsIgnoreCase("topGadgets")) {
322
			catalogIds = this.topGadgets;
325
			catalogIds = this.topGadgets;
-
 
326
		} else if (tag.equalsIgnoreCase("healthGadgets")) {
-
 
327
		catalogIds = this.healthGadgets;
323
		}
328
	}
324
		mandatoryQ.add(
329
		mandatoryQ.add(
325
				String.format("+{!parent which=\"catalogId_i:" + StringUtils.join(catalogIds, " ") + "\"} tagId_i:(%s)",
330
				String.format("+{!parent which=\"catalogId_i:" + StringUtils.join(catalogIds, " ") + "\"} tagId_i:(%s)",
326
						StringUtils.join(tagIds, " ")));
331
						StringUtils.join(tagIds, " ")));
327
		params.put("q", StringUtils.join(mandatoryQ, " "));
332
		params.put("q", StringUtils.join(mandatoryQ, " "));
328
		params.put("fl", "*, [child parentFilter=id:catalog*]");
333
		params.put("fl", "*, [child parentFilter=id:catalog*]");