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