|
|
@@ -0,0 +1,32 @@
|
|
|
+package com.uas.platform.b2c.prod.commodity.task;
|
|
|
+
|
|
|
+import com.uas.platform.b2c.prod.commodity.service.ReleaseProductByBatchService;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 每天零层执行清空表操作
|
|
|
+ *
|
|
|
+ * @author yuj 2018-07-31 12:15
|
|
|
+ */
|
|
|
+@Component("releaseByBatchTask")
|
|
|
+public class ReleaseByBatchTask {
|
|
|
+
|
|
|
+ private final ReleaseProductByBatchService releaseProductByBatchService;
|
|
|
+
|
|
|
+ private final Logger logger = Logger.getLogger(getClass());
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public ReleaseByBatchTask(ReleaseProductByBatchService releaseProductByBatchService) {
|
|
|
+ this.releaseProductByBatchService = releaseProductByBatchService;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每天清空表信息
|
|
|
+ */
|
|
|
+ public void autoCleanReleaseByBatch() {
|
|
|
+ releaseProductByBatchService.deleteAllInfo();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|