Subversion Repositories SmartDukaan

Rev

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

Rev 25140 Rev 25362
Line 428... Line 428...
428
		// return
428
		// return
429
		// responseSender.ok(ResponseCodeHolder.getMessage("ITM_AGNG_OK_1000"));
429
		// responseSender.ok(ResponseCodeHolder.getMessage("ITM_AGNG_OK_1000"));
430
	}
430
	}
431
 
431
 
432
	@RequestMapping(value = "/featurePanel", method = RequestMethod.GET)
432
	@RequestMapping(value = "/featurePanel", method = RequestMethod.GET)
433
	public String FeaturePanel(HttpServletRequest request,
433
	public String FeaturePanel(HttpServletRequest request,Model model) throws Exception {
434
			@RequestParam(name = "offset", defaultValue = "0") int offset,
-
 
435
			@RequestParam(name = "limit", defaultValue = "10") int limit, Model model) throws Exception {
-
 
436
 
434
 
437
		List<TagRanking> tagRanking = null;
435
		List<TagRanking> tagRanking = null;
438
 
-
 
439
		long size = 0;
-
 
440
		tagRanking = tagRankingRepository.selectAllTagRanking(offset, limit);
436
		tagRanking = tagRankingRepository.getAllTagRanking();
441
		size = tagRankingRepository.selectAllCount();
-
 
442
		LOGGER.info("tagRanking" + tagRanking);
437
		LOGGER.info("tagRanking" + tagRanking);
443
		if (!tagRanking.isEmpty()) {
438
		if (!tagRanking.isEmpty()) {
444
 
-
 
445
			Set<Integer> catalogIds = tagRanking.stream().map(x -> x.getCatalogItemId()).collect(Collectors.toSet());
439
            Set<Integer> catalogIds = tagRanking.stream().map(x -> x.getCatalogItemId()).collect(Collectors.toSet());
446
			List<Item> items = itemRepository.selectAllByCatalogIds(catalogIds);
440
			List<Item> items = itemRepository.selectAllByCatalogIds(catalogIds);
447
			Map<Integer, String> catalogDescription = items.stream().collect(Collectors.toMap(x -> x.getCatalogItemId(),
441
			Map<Integer, String> catalogDescription = items.stream().collect(Collectors.toMap(x -> x.getCatalogItemId(),
448
					x -> x.getItemDescription(), (description1, description2) -> description1));
442
					x -> x.getItemDescription(), (description1, description2) -> description1));
449
 
443
 
450
			LOGGER.info("catalogDescription" + catalogDescription);
444
			LOGGER.info("catalogDescription" + catalogDescription);
451
			model.addAttribute("tagRanking", tagRanking);
445
			model.addAttribute("tagRanking", tagRanking);
452
			model.addAttribute("catalogDescription", catalogDescription);
446
			model.addAttribute("catalogDescription", catalogDescription);
453
			model.addAttribute("start", offset + 1);
-
 
454
			model.addAttribute("size", size);
-
 
455
			model.addAttribute("url", "/getPaginatedfeature");
-
 
456
 
447
 
457
		} else {
448
		} else {
458
			model.addAttribute("tagRanking", tagRanking);
449
			model.addAttribute("tagRanking", tagRanking);
459
			model.addAttribute("size", size);
-
 
-
 
450
 
460
		}
451
		}
461
 
452
 
462
		return "feature";
453
		return "feature";
463
 
454
 
464
	}
455
	}
Line 928... Line 919...
928
			notifyIdNotifyColorMap.put(notifyColorChange.getId(), notifyColorChange);
919
			notifyIdNotifyColorMap.put(notifyColorChange.getId(), notifyColorChange);
929
		}
920
		}
930
		return notifyIdNotifyColorMap;
921
		return notifyIdNotifyColorMap;
931
	}
922
	}
932
 
923
 
-
 
924
	/*@RequestMapping(value = "/getContentUploader", method = RequestMethod.GET)
-
 
925
	public String contentUploader(HttpServletRequest request) throws Exception {
-
 
926
		return "content-upload";
-
 
927
	}*/
933
}
928
}
934
929