InitRunner.java 1.75 KB
Newer Older
412743165@qq.com committed
1 2
package com.jarvis.dataCenter.runner;

3
import com.google.code.or.OpenReplicator;
412743165@qq.com committed
4
import com.jarvis.common.redis.service.RedisService;
5 6 7
import com.jarvis.commons.open.replicator.info.ColumnInfo;
import com.jarvis.commons.open.replicator.keeper.TableInfoKeeper;
import com.jarvis.dataCenter.entity.report.ReportInvoiceInfo;
412743165@qq.com committed
8
import com.jarvis.dataCenter.service.impl.report.ReportDoInfoServiceImpl;
9 10 11
import com.jarvis.dataCenter.service.impl.report.ReportInvoiceInfoServiceImpl;
import com.jarvis.dataCenter.service.report.ThreadService;
import lombok.extern.slf4j.Slf4j;
412743165@qq.com committed
12 13 14 15 16 17
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

18 19
import java.util.List;

412743165@qq.com committed
20 21 22 23 24 25
/**
 * @author jinzhaopo
 * @date 2019-10-31 14:11
 */
@Component
@Order(value = 1)
26
@Slf4j
412743165@qq.com committed
27 28
public class InitRunner implements ApplicationRunner {

29 30 31 32

    @Autowired
    private ThreadService threadService;

412743165@qq.com committed
33 34 35 36 37 38 39 40 41
    @Autowired
    private RedisService redisService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
//        redisService.del(ReportDoInfoServiceImpl.REDIS_KEY);
//        redisService.del(ReportCsOrderInfoServiceImpl.REDIS_KEY);
//        redisService.del(ReportSkuInfoServiceImpl.REDIS_KEY);
//        redisService.del(ReportSoPoInfoServiceImpl.REDIS_KEY);
42 43 44 45 46 47 48 49 50 51
//        redisService.del(ReportInvoiceInfoServiceImpl.REDIS_KEY);

        threadService.syncAgency();
        threadService.syncAddress();
        threadService.syncInvoiceInfo();
        threadService.sycnDoInfo();
        threadService.syncSku();
        threadService.syncCsInfo();
        threadService.syncSoInfo();

412743165@qq.com committed
52 53

    }
54

412743165@qq.com committed
55
}