From 3503558ebc1e2ea0a6555d28687b985c3f3551e9 Mon Sep 17 00:00:00 2001 From: Iamasoldier <1272745473@qq.com> Date: Mon, 4 Aug 2025 19:41:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=96=87=E4=BB=B6=E4=B8=AD=E5=BF=83)?= =?UTF-8?q?=EF=BC=9A=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/central/order/controller/OrderController.java | 2 +- .../order/controller/OrderTenantAllocationController.java | 2 +- .../central/order/service/OrderTenantAllocationService.java | 2 +- .../order/service/impl/OrderTenantAllocationServiceImpl.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java index e6224200..94328643 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java +++ b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java @@ -227,7 +227,7 @@ public class OrderController { order.setDeviceSn(qrCode.getDeviceSn()); order.setOrderAmount(qrCode.getPrice()); - // 更新订单计数(用于下次分配) + // 记录订单分配日志 orderTenantAllocationService.incrementOrderCount(qrCode.getCodeId()); }else { diff --git a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderTenantAllocationController.java b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderTenantAllocationController.java index 50d1e535..cdc97863 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderTenantAllocationController.java +++ b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderTenantAllocationController.java @@ -75,7 +75,7 @@ public class OrderTenantAllocationController { scenicCount++; } - // 更新计数(模拟) + // 记录分配日志(模拟) allocationService.incrementOrderCount(qrCodeId); allocationDetails.put("order_" + (i + 1), Map.of( diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/OrderTenantAllocationService.java b/zlt-business/order-center/src/main/java/com/central/order/service/OrderTenantAllocationService.java index fbed1d29..d0ddd7d7 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/OrderTenantAllocationService.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/OrderTenantAllocationService.java @@ -24,7 +24,7 @@ public interface OrderTenantAllocationService { int getOrderCountByQrCode(String qrCodeId); /** - * 更新订单计数 + * 记录订单分配日志 * @param qrCodeId 二维码ID */ void incrementOrderCount(String qrCodeId); diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderTenantAllocationServiceImpl.java b/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderTenantAllocationServiceImpl.java index 167b5e3a..7fb785ba 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderTenantAllocationServiceImpl.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderTenantAllocationServiceImpl.java @@ -80,8 +80,8 @@ public class OrderTenantAllocationServiceImpl implements OrderTenantAllocationSe @Override public void incrementOrderCount(String qrCodeId) { // 订单计数通过实际创建订单时自动增加 - // 这里主要用于日志记录,实际计数通过查询orders表获取 - log.info("订单计数已更新 - qrCodeId: {}", qrCodeId); + // 实际计数通过查询orders表获取,这里主要用于日志记录 + log.info("订单计数已更新 - qrCodeId: {}, 当前订单总数: {}", qrCodeId, getOrderCountByQrCode(qrCodeId)); } @Override