|
|
|
@ -3,10 +3,9 @@ package com.glxp.sale.admin.thread;
|
|
|
|
|
import com.glxp.sale.admin.dao.info.ScheduledDao;
|
|
|
|
|
import com.glxp.sale.admin.entity.info.ScheduledEntity;
|
|
|
|
|
import com.glxp.sale.admin.req.udid.ScheduledRequest;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.impl.BasicDownloadServiceImpl;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.impl.BasicExportServiceImpl;
|
|
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.service.thrsys.impl.*;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.BasicDownloadService;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.BasicExportService;
|
|
|
|
|
import com.glxp.sale.admin.service.thrsys.*;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
|
import org.springframework.scheduling.annotation.SchedulingConfigurer;
|
|
|
|
@ -27,31 +26,31 @@ public class CleanDataTask implements SchedulingConfigurer {
|
|
|
|
|
@Resource
|
|
|
|
|
private ScheduledDao scheduledDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private BasicExportServiceImpl basicExportServiceImpl;
|
|
|
|
|
private BasicExportService basicExportService;
|
|
|
|
|
@Resource
|
|
|
|
|
private BasicDownloadServiceImpl basicDownloadServiceImpl;
|
|
|
|
|
private BasicDownloadService basicDownloadService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrCorpExportLogServiceImpl thrCorpExportLogServiceImpl;
|
|
|
|
|
private ThrCorpExportLogService thrCorpExportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrCorpImportDetailServiceImpl thrCorpImportDetailServiceImpl;
|
|
|
|
|
private ThrCorpImportDetailService thrCorpImportDetailService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrCorpImportLogServiceImpl thrCorpImportLogServiceImpl;
|
|
|
|
|
private ThrCorpImportLogService thrCorpImportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrImportLogServiceImpl thrImportLogServiceImpl;
|
|
|
|
|
private ThrImportLogService thrImportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrOrderDetailServiceImpl thrOrderDetailServiceImpl;
|
|
|
|
|
private ThrOrderDetailService thrOrderDetailService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrOrderExportLogServiceImpl thrOrderExportLogServiceImpl;
|
|
|
|
|
private ThrOrderExportLogService thrOrderExportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrOrderImportDetailServiceImpl thrOrderImportDetailServiceImpl;
|
|
|
|
|
private ThrOrderImportDetailService thrOrderImportDetailService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrOrderImportLogServiceImpl thrOrderImportLogServiceImpl;
|
|
|
|
|
private ThrOrderImportLogService thrOrderImportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrProductsImportLogServiceImpl thrProductsImportLogServiceImpl;
|
|
|
|
|
private ThrProductsImportLogService thrProductsImportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrProductsExportLogServiceImpl thrProductsExportLogServiceImpl;
|
|
|
|
|
private ThrProductsExportLogService thrProductsExportLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ThrProductsImportDetailServiceImpl thrProductsImportDetailServiceImpl;
|
|
|
|
|
private ThrProductsImportDetailService thrProductsImportDetailService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
|
|
|
|
@ -72,23 +71,23 @@ public class CleanDataTask implements SchedulingConfigurer {
|
|
|
|
|
log.info("开始清理 30 天前的历史数据");
|
|
|
|
|
//删除同步任务
|
|
|
|
|
log.info("开始删除同步任务历史记录");
|
|
|
|
|
basicExportServiceImpl.deleteByTime();
|
|
|
|
|
basicExportService.deleteByTime();
|
|
|
|
|
//删除下载记录
|
|
|
|
|
log.info("开始删除下载记录");
|
|
|
|
|
basicDownloadServiceImpl.deleteByTime();
|
|
|
|
|
basicDownloadService.deleteByTime();
|
|
|
|
|
//删除第三方数据
|
|
|
|
|
log.info("开始删除第三方数据");
|
|
|
|
|
thrCorpExportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrCorpImportDetailServiceImpl.deleteByTime();
|
|
|
|
|
thrCorpImportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrImportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrOrderDetailServiceImpl.deleteByTime();
|
|
|
|
|
thrOrderExportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrOrderImportDetailServiceImpl.deleteByTime();
|
|
|
|
|
thrOrderImportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrProductsImportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrProductsExportLogServiceImpl.deleteByTime();
|
|
|
|
|
thrProductsImportDetailServiceImpl.deleteByTime();
|
|
|
|
|
thrCorpExportLogService.deleteByTime();
|
|
|
|
|
thrCorpImportDetailService.deleteByTime();
|
|
|
|
|
thrCorpImportLogService.deleteByTime();
|
|
|
|
|
thrImportLogService.deleteByTime();
|
|
|
|
|
thrOrderDetailService.deleteByTime();
|
|
|
|
|
thrOrderExportLogService.deleteByTime();
|
|
|
|
|
thrOrderImportDetailService.deleteByTime();
|
|
|
|
|
thrOrderImportLogService.deleteByTime();
|
|
|
|
|
thrProductsImportLogService.deleteByTime();
|
|
|
|
|
thrProductsExportLogService.deleteByTime();
|
|
|
|
|
thrProductsImportDetailService.deleteByTime();
|
|
|
|
|
log.info("历史数据清理完成");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|