装柜回归测试

This commit is contained in:
2026-08-09 20:35:11 +08:00
parent b20cd9bd77
commit 0ce264a257
67 changed files with 3329 additions and 208 deletions
@@ -0,0 +1,20 @@
-- 托盘库位转移的持久化幂等契约;可在二期托盘库位表建表后重复执行。
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS wh_pallet_location_transfer_operation (
id BIGINT UNSIGNED NOT NULL COMMENT '调拨幂等操作ID',
tenant_id BIGINT UNSIGNED NOT NULL COMMENT '仓储公共资源域,固定为0',
source_service VARCHAR(40) NOT NULL COMMENT '来源服务',
source_business_id BIGINT UNSIGNED NOT NULL COMMENT '来源入仓单ID',
target_business_id BIGINT UNSIGNED NOT NULL COMMENT '目标子入仓单ID',
idempotency_key VARCHAR(128) NOT NULL COMMENT '调用方幂等键',
request_hash CHAR(64) NOT NULL COMMENT '规范化请求SHA-256摘要',
operation_status VARCHAR(20) NOT NULL DEFAULT 'PROCESSING' COMMENT 'PROCESSING处理中、COMPLETED已完成',
response_snapshot JSON NULL COMMENT '完成后的调拨结果快照,用于重复请求重放',
created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
completed_at DATETIME(3) NULL COMMENT '完成时间',
PRIMARY KEY (id),
UNIQUE KEY uk_pallet_location_transfer_idempotency
(tenant_id, source_service, source_business_id, target_business_id, idempotency_key),
KEY idx_pallet_location_transfer_source (tenant_id, source_service, source_business_id, operation_status)
) ENGINE=InnoDB COMMENT='托盘库位归属转移的持久化幂等操作记录';