Subversion Repositories SmartDukaan

Rev

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

Rev 26978 Rev 26991
Line 467... Line 467...
467
						fofoIds = fofoStoreRepository.selectAll().stream().map(x -> x.getId())
467
						fofoIds = fofoStoreRepository.selectAll().stream().map(x -> x.getId())
468
								.collect(Collectors.toList());
468
								.collect(Collectors.toList());
469
					}
469
					}
470
 
470
 
471
				}
471
				}
-
 
472
				LOGGER.info("fofoIds - {}", fofoIds);
472
				positionRetailerMap.put(position.getId(),
473
				positionRetailerMap.put(position.getId(),
473
						new ArrayList<CustomRetailer>(retailerService.getFofoRetailers(fofoIds).values()));
474
						new ArrayList<CustomRetailer>(retailerService.getFofoRetailers(fofoIds).values()));
474
 
475
 
475
			}
476
			}
476
		}
477
		}
Line 640... Line 641...
640
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
641
				.collect(Collectors.toMap(x -> x.getId(), x -> x));
641
 
642
 
642
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
643
		Map<Integer, List<CustomRetailer>> positonPartnerMap = this.getPositionCustomRetailerMap(categoryPositions);
643
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
644
		for (Map.Entry<Integer, List<CustomRetailer>> positionPartnerEntry : positonPartnerMap.entrySet()) {
644
			int authUserId = positionsMap.get(positionPartnerEntry.getKey()).getAuthUserId();
645
			int authUserId = positionsMap.get(positionPartnerEntry.getKey()).getAuthUserId();
645
			List<Integer> partnerEmails = positionPartnerEntry.getValue().stream()
646
			List<Integer> partnerIds = positionPartnerEntry.getValue().stream()
646
					.filter(x -> activeFofoIds.contains(x.getPartnerId())).map(x -> x.getPartnerId())
647
					.filter(x -> activeFofoIds.contains(x.getPartnerId())).map(x -> x.getPartnerId())
647
					.collect(Collectors.toList());
648
					.collect(Collectors.toList());
648
			AuthUser authUser = authRepository.selectById(authUserId);
649
			AuthUser authUser = authRepository.selectById(authUserId);
649
			if (authUser.isActive()) {
650
			if (authUser.isActive()) {
650
				if (!storeGuyMap.containsKey(authUserId)) {
651
				if (!storeGuyMap.containsKey(authUserId)) {
651
					storeGuyMap.put(authUserId, partnerEmails);
652
					storeGuyMap.put(authUserId, partnerIds);
652
				} else {
653
				} else {
653
					storeGuyMap.get(authUserId).addAll(partnerEmails);
654
					storeGuyMap.get(authUserId).addAll(partnerIds);
654
				}
655
				}
655
			}
656
			}
656
		}
657
		}
657
		return storeGuyMap;
658
		return storeGuyMap;
658
	}
659
	}