|
@@ -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;
|