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 | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 40 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..44151a4 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,22 @@ 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; import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +import java.util.Date; +import java.util.List; /** * 瀹氭椂浠诲姟 @@ -16,29 +27,55 @@ */ @Component @EnableScheduling +@Slf4j public class ScheduleTool { @Autowired private SystemDictDataBiz systemDictDataBiz; + @Autowired private WxBillService wxBillService; + @Autowired + private GoodsorderService goodsorderService; + + + @Autowired + private MemberRidesService memberRidesService; /** * @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("=====================缁撴潫姣忓ぉ鑷姩缁撶畻======================="); } } -- Gitblit v1.9.3