Subversion Repositories SmartDukaan

Rev

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

Rev 26468 Rev 26474
Line 730... Line 730...
730
	@RequestMapping(value = "/getAuthUserPartners", method = RequestMethod.GET)
730
	@RequestMapping(value = "/getAuthUserPartners", method = RequestMethod.GET)
731
	public String AuthUserPartnersDetail(HttpServletRequest request, Model model, @RequestParam int authId)
731
	public String AuthUserPartnersDetail(HttpServletRequest request, Model model, @RequestParam int authId)
732
			throws Exception {
732
			throws Exception {
733
 
733
 
734
		Map<Integer, List<Integer>> pp = csService.getAuthUserIdPartnerIdMapping();
734
		Map<Integer, List<Integer>> pp = csService.getAuthUserIdPartnerIdMapping();
-
 
735
		Map<Integer, CustomRetailer> fofoIdAndPartnerMap = null;
735
 
736
 
736
		Map<Integer, PartnerDetailModel> fofoIdAndallValues = partnerStatsService.getAllPartnerStats();
737
		Map<Integer, PartnerDetailModel> fofoIdAndallValues = partnerStatsService.getAllPartnerStats();
737
		if (authId != 0) {
738
		if (authId != 0) {
738
			List<Integer> fofoIds = pp.get(authId);
739
			List<Integer> fofoIds = pp.get(authId);
739
			fofoIdAndallValues = fofoIdAndallValues.entrySet().stream().filter(x -> fofoIds.contains(x.getKey()))
740
			fofoIdAndallValues = fofoIdAndallValues.entrySet().stream().filter(x -> fofoIds.contains(x.getKey()))
740
					.collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue()));
741
					.collect(Collectors.toMap(x -> x.getKey(), x -> x.getValue()));
-
 
742
			fofoIdAndPartnerMap = retailerService.getFofoRetailers(fofoIds);
-
 
743
		} else {
-
 
744
			fofoIdAndPartnerMap = retailerService.getFofoRetailers();
741
		}
745
		}
742
		Map<Integer, Object> fofoIdAndPartnerMap = new LinkedHashMap<>();
-
 
-
 
746
		
743
 
747
 
744
		model.addAttribute("fofoIdAndallValues", fofoIdAndallValues);
748
		model.addAttribute("fofoIdAndallValues", fofoIdAndallValues);
745
		model.addAttribute("fofoIdAndPartnerMap", fofoIdAndPartnerMap);
749
		model.addAttribute("fofoIdAndPartnerMap", fofoIdAndPartnerMap);
746
 
750
 
747
		return "auth_user_partner_detail";
751
		return "auth_user_partner_detail";