Subversion Repositories SmartDukaan

Rev

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

Rev 33247 Rev 33367
Line 1158... Line 1158...
1158
        List<Integer> storeIds = storeStream.map(x -> x.getId()).collect(Collectors.toList());
1158
        List<Integer> storeIds = storeStream.map(x -> x.getId()).collect(Collectors.toList());
1159
        return this.getFofoRetailers(storeIds);
1159
        return this.getFofoRetailers(storeIds);
1160
    }
1160
    }
1161
 
1161
 
1162
    @Override
1162
    @Override
-
 
1163
    @Cacheable(value = "retailerNames", cacheManager = "thirtyMinsTimeOutCacheManager")
-
 
1164
    public Map<Integer, CustomRetailer> getFofoRetailers(boolean activeOnly, String pinCode) throws ProfitMandiBusinessException {
-
 
1165
        List<PincodePartner> pincodePartners = pincodePartnerRepository.selectPartnersByPincode(pinCode);
-
 
1166
        List<Integer> storeIds = new ArrayList<>();
-
 
1167
        if (pincodePartners.size() > 0) {
-
 
1168
            List<Integer> fofoIds = pincodePartners.stream().map(x -> x.getFofoId()).collect(Collectors.toList());
-
 
1169
            List<FofoStore> fofoStores = fofoStoreRepository.selectActivePartnersByRetailerIds(fofoIds);
-
 
1170
            storeIds = fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList());
-
 
1171
        }
-
 
1172
        return this.getFofoRetailers(storeIds);
-
 
1173
    }
-
 
1174
 
-
 
1175
    @Override
1163
    @Cacheable(value = "allFofoRetailers", cacheManager = "thirtyMinsTimeOutCacheManager")
1176
    @Cacheable(value = "allFofoRetailers", cacheManager = "thirtyMinsTimeOutCacheManager")
1164
    public Map<Integer, CustomRetailer> getAllFofoRetailers() throws ProfitMandiBusinessException {
1177
    public Map<Integer, CustomRetailer> getAllFofoRetailers() throws ProfitMandiBusinessException {
1165
        // TODO Auto-generated method stub
1178
        // TODO Auto-generated method stub
1166
        Stream<FofoStore> storeStream = fofoStoreRepository.selectAll().stream();
1179
        Stream<FofoStore> storeStream = fofoStoreRepository.selectAll().stream();
1167
 
1180