From 373710cbf76aa297476b6a6ccdafdf1728fc3e70 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 17 Nov 2021 15:35:22 +0800 Subject: [PATCH] 20211108 --- gc-shop/src/main/java/com/xzx/gc/shop/job/ShopJob.java | 6 +++++- gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/gc-shop/src/main/java/com/xzx/gc/shop/job/ShopJob.java b/gc-shop/src/main/java/com/xzx/gc/shop/job/ShopJob.java index 3e47177..ce8a281 100644 --- a/gc-shop/src/main/java/com/xzx/gc/shop/job/ShopJob.java +++ b/gc-shop/src/main/java/com/xzx/gc/shop/job/ShopJob.java @@ -18,8 +18,12 @@ /** 时间是每1个小时变动一次 */ - @Scheduled(cron = "0 0 0/1 * * ?") + @Scheduled(cron = "0 0 23 * * ?") public void changeOrderStatue() { orderService.changeOrderStatue(); } + + public static void main(String[] args) { + + } } diff --git a/gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java b/gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java index 0f4a660..7f340ba 100644 --- a/gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java +++ b/gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java @@ -504,5 +504,13 @@ scoreOrderMapper.updateOrderStatusToDone(order.getId()); } } + } + + +// public static void main(String[] args) { +// DateTime dateTime = DateUtil.offsetDay(new Date(), -7); +// System.out.println(dateTime); +// } + } -- Gitblit v1.9.1