Browse Source

执行定时签收 执行拼团超时关闭拼团 订单支付超时定时关单任务

yubin 1 week ago
parent
commit
d0c8997091
1 changed files with 44 additions and 0 deletions
  1. 44 0
      cif-service/src/main/java/com/txz/cif/task/GeneralJob.java

+ 44 - 0
cif-service/src/main/java/com/txz/cif/task/GeneralJob.java

@@ -5,6 +5,7 @@ import cn.hutool.http.HttpResponse;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
+import com.txz.cif.dubbo.client.OrderDubboServiceClient;
 import com.txz.cif.service.DayCutService;
 import com.txz.cif.configurer.Parameters;
 import com.xxl.job.core.biz.model.ReturnT;
@@ -36,6 +37,9 @@ public class GeneralJob {
     private DayCutService dayCutService;
 
 
+    @Resource
+    private OrderDubboServiceClient orderDubboServiceClient;
+
     @Resource
     private Parameters parameters;
 
@@ -84,6 +88,46 @@ public class GeneralJob {
 
 
 
+    @XxlJob("scheduledTaskStorePinkSummaryClose")
+    public ReturnT<String> scheduledTaskStorePinkSummaryClose(String param) throws Exception {
+        try {
+            logger.info("【执行拼团超时关闭拼团】开始");
+            orderDubboServiceClient.scheduledTaskStorePinkSummaryClose();
+            logger.info("【执行拼团超时关闭拼团】完成");
+        } catch (Exception e) {
+            logger.error("【执行拼团超时关闭拼团】异常:e{}", e);
+            return ReturnT.FAIL;
+        }
+        return ReturnT.SUCCESS;
+    }
+
+
+    @XxlJob("scheduledTaskBatchSigning")
+    public ReturnT<String> scheduledTaskBatchSigning(String param) throws Exception {
+        try {
+            logger.info("【执行定时签收】开始");
+            orderDubboServiceClient.scheduledTaskBatchSigning();
+            logger.info("【执行定时签收】完成");
+        } catch (Exception e) {
+            logger.error("【执行定时签收】异常:e{}", e);
+            return ReturnT.FAIL;
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    @XxlJob("orderTimeoutAutomaticCancel")
+    public ReturnT<String> orderTimeoutAutomaticCancel(String param) throws Exception {
+        try {
+            logger.info("【订单支付超时定时关单任务】开始");
+            orderDubboServiceClient.orderTimeoutAutomaticCancel();
+            logger.info("【订单支付超时定时关单任务】完成");
+        } catch (Exception e) {
+            logger.error("【订单支付超时定时关单任务】异常:e{}", e);
+            return ReturnT.FAIL;
+        }
+        return ReturnT.SUCCESS;
+    }
+
     public static void main(String[] args) {
 //        int quhao = 154;
 //        int weihao = 9642;