diff --git a/api-admin/src/main/java/com/glxp/sale/admin/thread/CleanDataTask.java b/api-admin/src/main/java/com/glxp/sale/admin/thread/CleanDataTask.java index fe47d73..c632a1a 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/thread/CleanDataTask.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/thread/CleanDataTask.java @@ -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("历史数据清理完成"); } diff --git a/api-admin/src/main/resources/schemas/schema_v2.1.sql b/api-admin/src/main/resources/schemas/schema_v2.1.sql index 6b28adb..f37c318 100644 --- a/api-admin/src/main/resources/schemas/schema_v2.1.sql +++ b/api-admin/src/main/resources/schemas/schema_v2.1.sql @@ -6,11 +6,11 @@ CALL Pro_Temp_ColumnWork ('io_order','wzUploadResult','varchar(255) ', 1); CALL Pro_Temp_ColumnWork ('stock_order','noInvOut','tinyint', 1); -INSERT ignore INTO spms.scheduled(id, cronName, cron, customerId, remark) +INSERT ignore INTO scheduled(id, cronName, cron, customerId, remark) VALUES (16, 'ScheduledDeletion', '0 0 2 1/1 * ? ', NULL, '删除30天数据'); -INSERT ignore INTO spms.system_param_config ( id, parentId, paramName, paramKey, paramValue, paramStatus, paramType, paramExplain ) +INSERT ignore INTO system_param_config ( id, parentId, paramName, paramKey, paramValue, paramStatus, paramType, paramExplain ) VALUES ( 20009, 0, '删除30天数据', 'ScheduledDeletion', '1', 1, 0, '1:是,0:否' );