Subversion Repositories SmartDukaan

Rev

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

Rev 36560 Rev 36562
Line 265... Line 265...
265
 
265
 
266
    @Autowired
266
    @Autowired
267
    private SmartCartService smartCartService;
267
    private SmartCartService smartCartService;
268
 
268
 
269
    @Autowired
269
    @Autowired
270
    private com.spice.profitmandi.dao.repository.catalog.CatalogRepository catalogRepository;
-
 
271
 
-
 
272
    @Autowired
-
 
273
    private com.spice.profitmandi.service.transaction.SDCreditService sdCreditService;
270
    private com.spice.profitmandi.service.transaction.SDCreditService sdCreditService;
274
 
271
 
275
    @Autowired
272
    @Autowired
276
    private PartnerTypeChangeService partnerTypeChangeService;
273
    private PartnerTypeChangeService partnerTypeChangeService;
277
 
274
 
Line 838... Line 835...
838
                        .filter(Objects::nonNull)
835
                        .filter(Objects::nonNull)
839
                        .map(Item::getCatalogItemId)
836
                        .map(Item::getCatalogItemId)
840
                        .collect(Collectors.toSet());
837
                        .collect(Collectors.toSet());
841
 
838
 
842
                if (!soldCatalogIds.isEmpty()) {
839
                if (!soldCatalogIds.isEmpty()) {
843
                    List<com.spice.profitmandi.dao.entity.catalog.Catalog> catalogs = catalogRepository.selectAllByIds(new ArrayList<>(soldCatalogIds));
840
                    Set<Integer> flagshipCatalogIds = sdCreditService.getActiveFlagshipCatalogIds(new ArrayList<>(soldCatalogIds));
844
                    Set<Integer> flagshipCatalogIds = catalogs.stream()
-
 
845
                            .filter(com.spice.profitmandi.dao.entity.catalog.Catalog::isFlagship)
-
 
846
                            .map(com.spice.profitmandi.dao.entity.catalog.Catalog::getId)
-
 
847
                            .collect(Collectors.toSet());
-
 
848
 
-
 
849
                    if (!flagshipCatalogIds.isEmpty()) {
841
                    if (!flagshipCatalogIds.isEmpty()) {
850
                        sdCreditService.convertFlagshipOnSale(fofoId, flagshipCatalogIds);
842
                        sdCreditService.convertFlagshipOnSale(fofoId, flagshipCatalogIds);
851
                    }
843
                    }
852
                }
844
                }
853
            }
845
            }