| Line 42... |
Line 42... |
| 42 |
@Override
|
42 |
@Override
|
| 43 |
public Set<Integer> getAuthFofoIds(String email, boolean active) throws ProfitMandiBusinessException {
|
43 |
public Set<Integer> getAuthFofoIds(String email, boolean active) throws ProfitMandiBusinessException {
|
| 44 |
Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMappingByCategoryIds(categoryIds, active);
|
44 |
Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMappingByCategoryIds(categoryIds, active);
|
| 45 |
Set<Integer> authfofoIds = storeGuyMap.get(email);
|
45 |
Set<Integer> authfofoIds = storeGuyMap.get(email);
|
| 46 |
|
46 |
|
| 47 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
- |
|
| 48 |
if (authfofoIds == null) {
|
47 |
if (authfofoIds == null) {
|
| - |
|
48 |
AuthUser authUser = authRepository.selectByEmailOrMobile(email);
|
| - |
|
49 |
if (authUser != null) {
|
| 49 |
List<Position> positions1 = positionRepository.selectAllByAuthUserId(authUser.getId());
|
50 |
List<Position> positions1 = positionRepository.selectAllByAuthUserId(authUser.getId());
|
| 50 |
if (positions1.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_MASTER)
|
51 |
if (positions1.stream().anyMatch(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_MASTER)) {
|
| 51 |
.count() > 0) {
|
- |
|
| 52 |
authfofoIds = csService.getPositionCustomRetailerMap(positions1).values().stream().flatMap(x -> x.stream())
|
52 |
authfofoIds = csService.getPositionCustomRetailerMap(positions1).values().stream().flatMap(x -> x.stream())
|
| 53 |
.map(x -> x.getPartnerId()).collect(Collectors.toSet());
|
53 |
.map(x -> x.getPartnerId()).collect(Collectors.toSet());
|
| - |
|
54 |
}
|
| 54 |
}
|
55 |
}
|
| 55 |
}
|
56 |
}
|
| 56 |
return authfofoIds;
|
57 |
return authfofoIds;
|
| 57 |
}
|
58 |
}
|
| 58 |
}
|
59 |
}
|