fix(文件中心):优化日志记录
This commit is contained in:
+1
-1
@@ -227,7 +227,7 @@ public class OrderController {
|
|||||||
order.setDeviceSn(qrCode.getDeviceSn());
|
order.setDeviceSn(qrCode.getDeviceSn());
|
||||||
order.setOrderAmount(qrCode.getPrice());
|
order.setOrderAmount(qrCode.getPrice());
|
||||||
|
|
||||||
// 更新订单计数(用于下次分配)
|
// 记录订单分配日志
|
||||||
orderTenantAllocationService.incrementOrderCount(qrCode.getCodeId());
|
orderTenantAllocationService.incrementOrderCount(qrCode.getCodeId());
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
+1
-1
@@ -75,7 +75,7 @@ public class OrderTenantAllocationController {
|
|||||||
scenicCount++;
|
scenicCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新计数(模拟)
|
// 记录分配日志(模拟)
|
||||||
allocationService.incrementOrderCount(qrCodeId);
|
allocationService.incrementOrderCount(qrCodeId);
|
||||||
|
|
||||||
allocationDetails.put("order_" + (i + 1), Map.of(
|
allocationDetails.put("order_" + (i + 1), Map.of(
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ public interface OrderTenantAllocationService {
|
|||||||
int getOrderCountByQrCode(String qrCodeId);
|
int getOrderCountByQrCode(String qrCodeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新订单计数
|
* 记录订单分配日志
|
||||||
* @param qrCodeId 二维码ID
|
* @param qrCodeId 二维码ID
|
||||||
*/
|
*/
|
||||||
void incrementOrderCount(String qrCodeId);
|
void incrementOrderCount(String qrCodeId);
|
||||||
|
|||||||
+2
-2
@@ -80,8 +80,8 @@ public class OrderTenantAllocationServiceImpl implements OrderTenantAllocationSe
|
|||||||
@Override
|
@Override
|
||||||
public void incrementOrderCount(String qrCodeId) {
|
public void incrementOrderCount(String qrCodeId) {
|
||||||
// 订单计数通过实际创建订单时自动增加
|
// 订单计数通过实际创建订单时自动增加
|
||||||
// 这里主要用于日志记录,实际计数通过查询orders表获取
|
// 实际计数通过查询orders表获取,这里主要用于日志记录
|
||||||
log.info("订单计数已更新 - qrCodeId: {}", qrCodeId);
|
log.info("订单计数已更新 - qrCodeId: {}, 当前订单总数: {}", qrCodeId, getOrderCountByQrCode(qrCodeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user