fuxubing %!s(int64=3) %!d(string=hai) anos
pai
achega
87adb39940

+ 0 - 3
src/main/java/com/reptileclient/jlifeapp/schedule/HmBookOrderTask.java

@@ -48,9 +48,6 @@ public class HmBookOrderTask {
             // 数据去重
             hmBookOrderService.deleteDistinctData(null != hmBookOrder ? DateUtil.lastMonth() : null);
             jzBookOrderService.deleteDistinctData(null != hmBookOrder ? DateUtil.lastMonth() : null);
-            // 同步盒马付款单数据
-            logger.info("开始执行同步盒马付款单数据");
-            hmPaymentOrderService.addPaymentOrderList();
 
             // 非盒马订单 只有服务单的同步补充订单和客户信息
             jzBookOrderService.updateCustomerIdIsNull();

+ 39 - 0
src/main/java/com/reptileclient/jlifeapp/schedule/HmPaymentOrderTask.java

@@ -0,0 +1,39 @@
+package com.reptileclient.jlifeapp.schedule;
+
+import cn.hutool.core.date.DateUtil;
+import com.reptileclient.jlifeapp.service.HmPaymentOrderService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+
+/**
+ * @author fuxubing
+ */
+@Async
+@Component
+public class HmPaymentOrderTask {
+    private static final Logger logger = LoggerFactory.getLogger(HmPaymentOrderTask.class);
+    @Resource
+    private HmPaymentOrderService hmPaymentOrderService;
+
+    /**
+     * 每天1点执行一次
+     */
+    @Scheduled(cron = "0 0/1 * * * ?")
+    //@Scheduled(cron = "0 0 1 * * ?")
+    public void runTask() {
+        logger.info("开始执行同步盒马服务付款单数据");
+        try {
+            int row = hmPaymentOrderService.addPaymentOrderList();
+            logger.info("执行完成总条数:{}", row);
+            //数据去重
+            hmPaymentOrderService.deleteDistinctData(DateUtil.lastMonth());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 0 - 36
src/main/java/com/reptileclient/jlifeapp/schedule/HmPaymentOrderTask.java.bak

@@ -1,36 +0,0 @@
-package com.reptileclient.jlifeapp.schedule;
-
-import com.reptileclient.jlifeapp.service.HmPaymentOrderService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-
-/**
- * @author fuxubing
- */
-@Async
-@Component
-public class HmPaymentOrderTask {
-    private static final Logger logger = LoggerFactory.getLogger(HmPaymentOrderTask.class);
-    @Resource
-    private HmPaymentOrderService hmPaymentOrderService;
-//
-//    /**
-//     * 每天1点执行一次
-//     */
-//    @Scheduled(cron = "0 0 1 * * ?")
-//    public void runTask() {
-//        logger.info("开始执行同步盒马服务付款单数据");
-//        try {
-//            int row = hmPaymentOrderService.addPaymentOrderList();
-//            logger.info("执行完成总条数:{}", row);
-//            //数据去重
-//            hmPaymentOrderService.deleteDistinctData(DateUtil.lastMonth());
-//        } catch (Exception e) {
-//            e.printStackTrace();
-//        }
-//    }
-}