From 53e25d994cfbf6608f6fd1eef2e27ec129fd41c6 Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期五, 03 十一月 2023 15:36:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
server/platform/src/main/java/com/doumee/task/ScheduleTool.java | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
index ad8077e..456145f 100644
--- a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
+++ b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -2,11 +2,23 @@
import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.constants.Constants;
+import com.doumee.core.exception.BusinessException;
+import com.doumee.core.utils.DateUtil;
+import com.doumee.dao.business.model.Goodsorder;
+import com.doumee.service.business.GoodsorderService;
+import com.doumee.service.business.MemberRidesService;
+import com.doumee.service.business.SitesService;
import com.doumee.service.business.WxBillService;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import java.util.Date;
+import java.util.List;
/**
* 瀹氭椂浠诲姟
@@ -16,29 +28,70 @@
*/
@Component
@EnableScheduling
+@Slf4j
public class ScheduleTool {
@Autowired
private SystemDictDataBiz systemDictDataBiz;
+
@Autowired
private WxBillService wxBillService;
+
+ @Autowired
+ private GoodsorderService goodsorderService;
+
+ @Autowired
+ private MemberRidesService memberRidesService;
+
+ @Autowired
+ private SitesService sitesService;
/**
* @throws Exception
*/
@Scheduled(cron = "0 0 11 * * ? ")
public void syncStudent() throws Exception {
- wxBillService.getWxBill();
+ //鍓嶄竴澶╃殑鏁告摎
+ Date ydate = DateUtil.addDaysToDate(new Date(), -1);
+ wxBillService.getWxBill(ydate);
}
/**
+ * 娓│
* @throws Exception
*/
- @Scheduled(fixedDelay = 1000*60)
+ @Scheduled(cron = "0 0 21 * * ? ")
public void getYesterdayBill() throws Exception {
- wxBillService.getWxBill();
+ log.info("=====================寮�濮嬫瘡澶╄嚜鍔ㄧ粨绠�=======================");
+ goodsorderService.autoCloseOrder();
+ log.info("=====================缁撴潫姣忓ぉ鑷姩缁撶畻=======================");
}
+
+ /**
+ * 瀹氭椂鍒锋柊楠戣涓殑鏁板厖鍊兼湭寮�閿佸け璐�
+ * 30 绉掑埛鏂颁竴娆�
+ * @throws Exception
+ */
+ @Scheduled(cron = "0/30 * * * * ? ")
+ public void autoRefreshLockStatus() throws Exception {
+ log.info("=====================寮�濮嬪畾鏃跺埛鏂伴獞琛屼腑鐨勬暟鍏呭�兼湭寮�閿佸け璐�=======================");
+ memberRidesService.autoRefreshLockStatus();
+ log.info("=====================缁撴潫瀹氭椂鍒锋柊楠戣涓殑鏁板厖鍊兼湭寮�閿佸け璐�=======================");
+ }
+
+
+ /**
+ * 绔欑偣杞﹁締婊℃灦鐜囬璀�
+ * @throws Exception
+ */
+ @Scheduled(fixedDelay = 1000L * 60L * 10L)
+ public void siteReserves() throws Exception {
+ log.info("=====================寮�濮� 绔欑偣杞﹁締婊℃灦鐜囬璀�=======================");
+ sitesService.siteReservesNotice();;
+ log.info("=====================缁撴潫 绔欑偣杞﹁締婊℃灦鐜囬璀�=======================");
+ }
+
}
--
Gitblit v1.9.3