fix(文件中心):优化日志记录

This commit is contained in:
2025-08-04 19:41:58 +08:00
parent 50e44e24bd
commit 3503558ebc
4 changed files with 5 additions and 5 deletions
@@ -227,7 +227,7 @@ public class OrderController {
order.setDeviceSn(qrCode.getDeviceSn());
order.setOrderAmount(qrCode.getPrice());
// 更新订单计数(用于下次分配)
// 记录订单分配日志
orderTenantAllocationService.incrementOrderCount(qrCode.getCodeId());
}else {
@@ -75,7 +75,7 @@ public class OrderTenantAllocationController {
scenicCount++;
}
// 更新计数(模拟)
// 记录分配日志(模拟)
allocationService.incrementOrderCount(qrCodeId);
allocationDetails.put("order_" + (i + 1), Map.of(
@@ -24,7 +24,7 @@ public interface OrderTenantAllocationService {
int getOrderCountByQrCode(String qrCodeId);
/**
* 更新订单计数
* 记录订单分配日志
* @param qrCodeId 二维码ID
*/
void incrementOrderCount(String qrCodeId);
@@ -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