| 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.isInternal());
|
1168 |
Stream<FofoStore> storeStream = fofoStoreRepository.selectAll().stream().filter(x -> x.getFofoType().equals(FofoType.INTERNAL));
|
| 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);
|