Subversion Repositories SmartDukaan

Rev

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

Rev 26960 Rev 26978
Line 590... Line 590...
590
 
590
 
591
		return emails;
591
		return emails;
592
	}
592
	}
593
 
593
 
594
	@Override
594
	@Override
-
 
595
	public Map<EscalationType, String> getAuthUserAndEsclationTypeByPartnerId(int fofoId) {
-
 
596
 
-
 
597
		List<String> emails = new ArrayList<>();
-
 
598
		Map<EscalationType, String> emailEsclationTypeMap = new HashMap<>();
-
 
599
		List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId())
-
 
600
				.collect(Collectors.toList());
-
 
601
 
-
 
602
		regionIds.add(5);// All partners Id;
-
 
603
		List<Integer> fofoIds = new ArrayList<>();
-
 
604
		fofoIds.add(fofoId);
-
 
605
		fofoIds.add(0);
-
 
606
 
-
 
607
		LOGGER.info("fofoIds" + fofoIds);
-
 
608
		List<Integer> partnerPositionIds = partnersPositionRepository.selectByRegionIdAndPartnerId(regionIds, fofoIds)
-
 
609
				.stream().map(x -> x.getPositionId()).collect(Collectors.toList());
-
 
610
 
-
 
611
		LOGGER.info("partnerPositionIds" + partnerPositionIds);
-
 
612
 
-
 
613
		for (Integer partnerPostionId : partnerPositionIds) {
-
 
614
			Position position = positionRepository.selectByIdAndCategoryId(partnerPostionId,
-
 
615
					ProfitMandiConstants.TICKET_CATEGORY_SALES);
-
 
616
			LOGGER.info("position" + position);
-
 
617
			if (position != null) {
-
 
618
 
-
 
619
				AuthUser authUser = authRepository.selectById(position.getAuthUserId());
-
 
620
				LOGGER.info("authUser" + authUser);
-
 
621
 
-
 
622
				emailEsclationTypeMap.put(position.getEscalationType(), authUser.getEmailId());
-
 
623
			}
-
 
624
		}
-
 
625
 
-
 
626
		LOGGER.info("emailEsclationTypeMap" + emailEsclationTypeMap);
-
 
627
 
-
 
628
		return emailEsclationTypeMap;
-
 
629
	}
-
 
630
 
-
 
631
	@Override
595
	@Cacheable(value = "authUserIdPartnerIdMapping", cacheManager = "thirtyMinsTimeOutCacheManager")
632
	@Cacheable(value = "authUserIdPartnerIdMapping", cacheManager = "thirtyMinsTimeOutCacheManager")
596
	public Map<Integer, List<Integer>> getAuthUserIdPartnerIdMapping() {
633
	public Map<Integer, List<Integer>> getAuthUserIdPartnerIdMapping() {
597
		Map<Integer, List<Integer>> storeGuyMap = new HashMap<>();
634
		Map<Integer, List<Integer>> storeGuyMap = new HashMap<>();
598
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
635
		Set<Integer> activeFofoIds = fofoStoreRepository.selectActiveStores().stream().map(x -> x.getId())
599
				.collect(Collectors.toSet());
636
				.collect(Collectors.toSet());