| Line 1163... |
Line 1163... |
| 1163 |
|
1163 |
|
| 1164 |
@Override
|
1164 |
@Override
|
| 1165 |
@Cacheable(value = "retailerNames", cacheManager = "thirtyMinsTimeOutCacheManager")
|
1165 |
@Cacheable(value = "retailerNames", cacheManager = "thirtyMinsTimeOutCacheManager")
|
| 1166 |
public Map<Integer, CustomRetailer> getFofoRetailers(boolean activeOnly) throws ProfitMandiBusinessException {
|
1166 |
public Map<Integer, CustomRetailer> getFofoRetailers(boolean activeOnly) throws ProfitMandiBusinessException {
|
| 1167 |
// TODO Auto-generated method stub
|
1167 |
// TODO Auto-generated method stub
|
| 1168 |
Stream<FofoStore> storeStream = fofoStoreRepository.selectAll().stream().filter(x -> x.getFofoType().equals(FofoType.INTERNAL));
|
1168 |
Stream<FofoStore> storeStream = fofoStoreRepository.selectAll().stream().filter(x -> x.getFofoType().equals(FofoType.FRANCHISE));
|
| 1169 |
if (activeOnly) {
|
1169 |
if (activeOnly) {
|
| 1170 |
storeStream = storeStream.filter(x -> x.isActive());
|
1170 |
storeStream = storeStream.filter(x -> x.isActive());
|
| 1171 |
}
|
1171 |
}
|
| 1172 |
List<Integer> storeIds = storeStream.map(x -> x.getId()).collect(Collectors.toList());
|
1172 |
List<Integer> storeIds = storeStream.map(x -> x.getId()).collect(Collectors.toList());
|
| 1173 |
return this.getFofoRetailers(storeIds);
|
1173 |
return this.getFofoRetailers(storeIds);
|
| Line 1188... |
Line 1188... |
| 1188 |
|
1188 |
|
| 1189 |
@Override
|
1189 |
@Override
|
| 1190 |
@Cacheable(value = "allFofoRetailers", cacheManager = "thirtyMinsTimeOutCacheManager")
|
1190 |
@Cacheable(value = "allFofoRetailers", cacheManager = "thirtyMinsTimeOutCacheManager")
|
| 1191 |
public Map<Integer, CustomRetailer> getAllFofoRetailers() throws ProfitMandiBusinessException {
|
1191 |
public Map<Integer, CustomRetailer> getAllFofoRetailers() throws ProfitMandiBusinessException {
|
| 1192 |
// TODO Auto-generated method stub
|
1192 |
// TODO Auto-generated method stub
|
| 1193 |
Stream<FofoStore> storeStream = fofoStoreRepository.selectAll().stream();
|
- |
|
| 1194 |
|
- |
|
| 1195 |
List<Integer> storeIds = storeStream.map(x -> x.getId()).collect(Collectors.toList());
|
1193 |
List<Integer> storeIds = fofoStoreRepository.selectAll().stream().map(x -> x.getId()).collect(Collectors.toList());
|
| 1196 |
return this.getFofoRetailers(storeIds);
|
1194 |
return this.getFofoRetailers(storeIds);
|
| 1197 |
}
|
1195 |
}
|
| 1198 |
|
1196 |
|
| 1199 |
@Override
|
1197 |
@Override
|
| 1200 |
@Cacheable(value = "allFofoRetailersInternalFalse", cacheManager = "thirtyMinsTimeOutCacheManager")
|
1198 |
@Cacheable(value = "allFofoRetailersInternalFalse", cacheManager = "thirtyMinsTimeOutCacheManager")
|