From 43aab58c9ecb1203770ba382efbdbae299ca87ec Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期一, 26 十月 2026 15:12:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_business' into dev_business

---
 yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/agent/MdmAgentImportCommandService.java |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/agent/MdmAgentImportCommandService.java b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/agent/MdmAgentImportCommandService.java
index f3c144c..173b562 100644
--- a/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/agent/MdmAgentImportCommandService.java
+++ b/yudao-module-mdm/src/main/java/cn/iocoder/yudao/module/mdm/service/agent/MdmAgentImportCommandService.java
@@ -74,11 +74,10 @@
                     "鏈嶅姟鏈紑鏀惧悓姝� MES锛岃鍏抽棴 syncMes 鍚庨噸璇�");
         }
         String requestDigest = buildRequestDigest(reqVO);
-        Long tenantId = principal.tenantId();
         Long ownerUserId = principal.userId();
 
         // 1. 骞傜瓑鍛戒腑锛氬懡浠� ID 浼樺厛锛屽叾娆″箓绛夐敭
-        MdmAgentImportCommandDO existing = commandMapper.selectByCommandId(tenantId, ownerUserId, reqVO.getCommandId());
+        MdmAgentImportCommandDO existing = commandMapper.selectByCommandId(ownerUserId, reqVO.getCommandId());
         if (existing != null) {
             if (!existing.getRequestDigest().equals(requestDigest)) {
                 throw new AgentBridgeException(HttpStatus.CONFLICT, "COMMAND_ID_CONFLICT",
@@ -86,7 +85,7 @@
             }
             return toReceipt(existing);
         }
-        existing = commandMapper.selectByIdempotencyKey(tenantId, ownerUserId, reqVO.getIdempotencyKey());
+        existing = commandMapper.selectByIdempotencyKey(ownerUserId, reqVO.getIdempotencyKey());
         if (existing != null) {
             if (!existing.getRequestDigest().equals(requestDigest)) {
                 throw new AgentBridgeException(HttpStatus.CONFLICT, "IDEMPOTENCY_CONFLICT",
@@ -112,7 +111,6 @@
                 .commandId(reqVO.getCommandId())
                 .idempotencyKey(reqVO.getIdempotencyKey())
                 .requestDigest(requestDigest)
-                .tenantId(tenantId)
                 .ownerUserId(ownerUserId)
                 .sessionId(reqVO.getSessionId())
                 .attachmentId(reqVO.getAttachmentId())
@@ -128,9 +126,9 @@
         try {
             commandMapper.insert(command);
         } catch (DuplicateKeyException ex) {
-            MdmAgentImportCommandDO raced = commandMapper.selectByCommandId(tenantId, ownerUserId, reqVO.getCommandId());
+            MdmAgentImportCommandDO raced = commandMapper.selectByCommandId(ownerUserId, reqVO.getCommandId());
             if (raced == null) {
-                raced = commandMapper.selectByIdempotencyKey(tenantId, ownerUserId, reqVO.getIdempotencyKey());
+                raced = commandMapper.selectByIdempotencyKey(ownerUserId, reqVO.getIdempotencyKey());
             }
             if (raced == null) {
                 throw ex;
@@ -244,7 +242,7 @@
 
     public MdmAgentImportReceiptRespVO getCommand(String commandId, AgentPrincipal principal) {
         MdmAgentImportCommandDO command = commandMapper.selectByCommandId(
-                principal.tenantId(), principal.userId(), commandId);
+                principal.userId(), commandId);
         if (command == null) {
             throw new AgentBridgeException(HttpStatus.NOT_FOUND, "COMMAND_NOT_FOUND", "瀵煎叆鍛戒护涓嶅瓨鍦�");
         }

--
Gitblit v1.9.3