Subversion Repositories SmartDukaan

Rev

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

Rev 31754 Rev 31756
Line 92... Line 92...
92
    }
92
    }
93
 
93
 
94
    public void getPriceDrop() throws ProfitMandiBusinessException {
94
    public void getPriceDrop() throws ProfitMandiBusinessException {
95
        WebListing webListing = webListingRepository.selectByUrl("partner-price-drop");
95
        WebListing webListing = webListingRepository.selectByUrl("partner-price-drop");
96
 
96
 
97
        List<WebProductListing> webProductListings = webProductListingRepository.selectAllByWebListingId(webListing.getId());
-
 
98
 
-
 
99
        Set<Integer> catalogItemIds = priceDropRepository.selectAllByDatesBetweenSortByDate(LocalDateTime.now().minusDays(30), LocalDateTime.now()).stream().filter(x -> x.getAmount() > 0).map(x -> x.getCatalogItemId()).collect(Collectors.toSet());
97
        Set<Integer> catalogItemIds = priceDropRepository.selectAllByDatesBetweenSortByDate(LocalDateTime.now().minusDays(30), LocalDateTime.now()).stream().filter(x -> x.getAmount() > 0).map(x -> x.getCatalogItemId()).collect(Collectors.toSet());
100
 
98
 
101
        LOGGER.info("catalogItemIds {}", catalogItemIds);
99
        LOGGER.info("catalogItemIds {}", catalogItemIds);
102
        if (!catalogItemIds.isEmpty()) {
100
        if (!catalogItemIds.isEmpty()) {
103
            webProductListingRepository.deleteByEqual(webListing.getId());
101
            webProductListingRepository.deleteByEqual(webListing.getId());
Line 189... Line 187...
189
    @Scheduled(cron = "0 */30 * * * *")
187
    @Scheduled(cron = "0 */30 * * * *")
190
    public void scheduledPushDataToSolr() throws Throwable {
188
    public void scheduledPushDataToSolr() throws Throwable {
191
        this.pushDataToSolr();
189
        this.pushDataToSolr();
192
    }
190
    }
193
 
191
 
194
    @Scheduled(cron = "0 0 8 * * *")
192
    @Scheduled(cron = "0 30 8,15 * * *")
195
    public void scheduledGetBestSeller() throws Throwable {
193
    public void scheduledGetBestSeller() throws Throwable {
196
        this.getBestSeller();
194
        this.getBestSeller();
197
    }
195
    }
198
 
196
 
199
    @Scheduled(cron = "0 0 8 * * *")
197
    @Scheduled(cron = "0 30 8,15 * * *")
200
    public void scheduledGetPriceDrop() throws Throwable {
198
    public void scheduledGetPriceDrop() throws Throwable {
201
        this.getPriceDrop();
199
        this.getPriceDrop();
202
    }
200
    }
203
 
201
 
204
    @Scheduled(cron = "0 0 8 * * *")
202
    @Scheduled(cron = "0 30 8 * * *")
205
    public void scheduledGetNewLaunches() throws Throwable {
203
    public void scheduledGetNewLaunches() throws Throwable {
206
        this.getNewLaunches();
204
        this.getNewLaunches();
207
    }
205
    }
208
 
206
 
209
    @Scheduled(cron = "0 0 8 * * *")
207
    @Scheduled(cron = "0 30 8 * * *")
210
    public void scheduledGetSpecialSupport() throws Throwable {
208
    public void scheduledGetSpecialSupport() throws Throwable {
211
        this.getSpecialSupport();
209
        this.getSpecialSupport();
212
    }
210
    }
213
 
211
 
214
    @Scheduled(cron = "0 0 8 * * *")
212
    @Scheduled(cron = "0 30 8 * * *")
215
    public void scheduledGetUpgradeOffer() throws Throwable {
213
    public void scheduledGetUpgradeOffer() throws Throwable {
216
        this.getUpgradeOffer();
214
        this.getUpgradeOffer();
217
    }
215
    }
218
}
216
}
219
 
217