From 06905ac0d2224dc4fd9d9ebf54627d26e0812d6a Mon Sep 17 00:00:00 2001
From: gongzuming <gongzuming>
Date: 星期四, 12 九月 2024 17:39:07 +0800
Subject: [PATCH] 散户分配库位bug

---
 src/main/java/com/mzl/flower/schedule/WarehouseScheduleService.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/mzl/flower/schedule/WarehouseScheduleService.java b/src/main/java/com/mzl/flower/schedule/WarehouseScheduleService.java
index 1c7f2a5..d7434a4 100644
--- a/src/main/java/com/mzl/flower/schedule/WarehouseScheduleService.java
+++ b/src/main/java/com/mzl/flower/schedule/WarehouseScheduleService.java
@@ -34,7 +34,7 @@
     /**
      * 每天17点,定时分配订单库位(查询前一天17点到今天17点支付完成且未分配库位的订单)
      */
-    @Scheduled(cron = "0 35 15 * * ?")
+    @Scheduled(cron = "0 0 17 * * ?")
     public void allocatedWarehouseLocation() {
         log.info("定时分配订单库位开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
         //查询当日待分配的订单
@@ -85,8 +85,8 @@
                         }
                     }
                     if(customerOrders!=null && customerOrders.size()>0){ //散户订单
+                        Map<String, WarehouseLocationDTO> customerLocationMap = new HashMap<>();
                         for (Order order : customerOrders) {
-                            Map<String, WarehouseLocationDTO> customerLocationMap = new HashMap<>();
                             if(locations!=null && locations.size()>0){
                                 String key = order.getCreateBy()+"||"+order.getCustomerAddress();
                                 WarehouseLocationDTO location = null;

--
Gitblit v1.9.3