From 95d3f1671b5a27bb811a374d7c06df5e2dc9035b Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期二, 17 十月 2023 09:41:34 +0800 Subject: [PATCH] 价格配置 --- server/platform/src/main/java/com/doumee/task/ScheduleTool.java | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 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 c9873e4..71b740e 100644 --- a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java +++ b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java @@ -2,10 +2,21 @@ 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.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; /** * 瀹氭椂浠诲姟 @@ -15,6 +26,7 @@ */ @Component @EnableScheduling +@Slf4j public class ScheduleTool { @@ -22,12 +34,30 @@ @Autowired private SystemDictDataBiz systemDictDataBiz; + @Autowired + private WxBillService wxBillService; + + @Autowired + private GoodsorderService goodsorderService; /** * @throws Exception */ - @Scheduled(cron = "0 0 02 * * ? ") + @Scheduled(cron = "0 0 11 * * ? ") public void syncStudent() throws Exception { + //鍓嶄竴澶╃殑鏁告摎 + Date ydate = DateUtil.addDaysToDate(new Date(), -1); + wxBillService.getWxBill(ydate); + } + /** + * 娓│ + * @throws Exception + */ + @Scheduled(cron = "0 0 21 * * ? ") + public void getYesterdayBill() throws Exception { + log.info("=====================寮�濮嬫瘡澶╄嚜鍔ㄧ粨绠�======================="); + goodsorderService.autoCloseOrder(); + log.info("=====================缁撴潫姣忓ぉ鑷姩缁撶畻======================="); } } -- Gitblit v1.9.3