|
|
package com.yoho.search.consumer.job;
|
|
|
|
|
|
import com.yoho.search.consumer.service.base.ProductPriceService;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -22,6 +23,8 @@ public class IndexRebuildJob implements ApplicationEventPublisherAware { |
|
|
private IYohoIndexService yohoIndexService;
|
|
|
@Autowired
|
|
|
private RebuildFlagService rebuildFlagService;
|
|
|
@Autowired
|
|
|
private ProductPriceService productPriceService;
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(IndexRebuildJob.class);
|
|
|
|
...
|
...
|
@@ -33,6 +36,11 @@ public class IndexRebuildJob implements ApplicationEventPublisherAware { |
|
|
}
|
|
|
|
|
|
@Scheduled(cron = "0 0 3 * * ?")
|
|
|
public void rebuildIndexTask() {
|
|
|
productPriceService.batchUpdateHistoryPrice();
|
|
|
execute();
|
|
|
}
|
|
|
|
|
|
public void execute() {
|
|
|
long begin = System.currentTimeMillis();
|
|
|
logger.info("indexRebuildJob execute start----[begin={}]", begin);
|
...
|
...
|
|