From c6faae18b9e8fa2bdf9e00aecac4e8152b09ef76 Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期三, 25 十月 2023 10:20:33 +0800
Subject: [PATCH] # 用户禁用

---
 server/platform/src/main/java/com/doumee/task/ScheduleTool.java |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 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 fe11644..44151a4 100644
--- a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
+++ b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -3,10 +3,13 @@
 
 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.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;
@@ -24,6 +27,7 @@
  */
 @Component
 @EnableScheduling
+@Slf4j
 public class ScheduleTool {
 
 
@@ -36,6 +40,10 @@
 
     @Autowired
     private GoodsorderService goodsorderService;
+
+
+    @Autowired
+    private MemberRidesService memberRidesService;
     /**
      * @throws Exception
      */
@@ -50,19 +58,24 @@
      * 娓│
      * @throws Exception
      */
-//    @Scheduled(fixedDelay = 1000*60)
+    @Scheduled(cron = "0 0 21 * * ? ")
     public void getYesterdayBill() throws Exception {
+        log.info("=====================寮�濮嬫瘡澶╄嚜鍔ㄧ粨绠�=======================");
+        goodsorderService.autoCloseOrder();
+        log.info("=====================缁撴潫姣忓ぉ鑷姩缁撶畻=======================");
 
-        Goodsorder goodsorder = new Goodsorder();
-        goodsorder.setIsdeleted(Constants.ZERO);
-        goodsorder.setStatus(Constants.goodsorderStatus.pay);
-        List<Goodsorder> list = goodsorderService.findList(goodsorder);
-        if (!CollectionUtils.isEmpty(list)){
-            list.forEach(s->{
-                goodsorderService.closerGoodsorder(s.getId());
-            });
+    }
 
-        }
+    /**
+     * 瀹氭椂鍒锋柊楠戣涓殑鏁板厖鍊兼湭寮�閿佸け璐�
+     * 30 绉掑埛鏂颁竴娆�
+     * @throws Exception
+     */
+    @Scheduled(cron = "0/30 * * * * ? ")
+    public void autoRefreshLockStatus() throws Exception {
+        log.info("=====================寮�濮嬫瘡澶╄嚜鍔ㄧ粨绠�=======================");
+        memberRidesService.autoRefreshLockStatus();
+        log.info("=====================缁撴潫姣忓ぉ鑷姩缁撶畻=======================");
 
     }
 }

--
Gitblit v1.9.3