Subversion Repositories SmartDukaan

Rev

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

Rev 34813 Rev 34936
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);