From b6c0dc29218252bf207440446276b53d66ba35e1 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 23 十月 2026 19:06:13 +0800
Subject: [PATCH] feat(config): 添加HSC公司配置和部署脚本

---
 yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java
index a1b00ef..3d7629d 100644
--- a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java
+++ b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/service/storage/SystemAgentImportBridgeService.java
@@ -75,6 +75,23 @@
                         "闄勪欢缁戝畾澶辫触锛岃閲嶆柊涓婁紶鍚庡啀璇�", true, null));
     }
 
+    /** 鍒犻櫎琛ュ綍闄勪欢鎵�灞炰細璇濓細闄勪欢鍏崇郴銆乥lob 璁板綍涓庣鐩樻枃浠朵竴骞舵竻鐞嗭紝闄勪欢涓嶅瓨鍦ㄦ椂骞傜瓑杩斿洖銆� */
+    @Transactional(rollbackFor = Exception.class)
+    public void deleteImportAttachment(Long attachmentId) {
+        SystemStorageAttachmentDO attachment = attachmentMapper.selectById(attachmentId);
+        if (attachment == null) {
+            return;
+        }
+        if (!RECORD_TYPE.equals(attachment.getRecordType())) {
+            throw new AgentBridgeException(HttpStatus.FORBIDDEN, "ATTACHMENT_FORBIDDEN", "闄勪欢涓嶅彲璁块棶");
+        }
+        Long sessionId = attachment.getRecordId();
+        requireOwnedSession(sessionId);
+        // 鎸変細璇濇暣鎵瑰垹闄わ紝鍚屼竴浼氳瘽鍐呰鏇挎崲鐨勬棫闄勪欢琛屼笌 blob 鏂囦欢閮戒笉浼氭畫鐣�
+        attachmentService.deleteAttachmentsByRecordTypeAndRecordId(RECORD_TYPE, sessionId);
+        sessionMapper.deleteById(sessionId);
+    }
+
     public SystemAgentAttachmentRef requireOwnedAttachmentRef(Long attachmentId) {
         SystemStorageAttachmentDO attachment = attachmentMapper.selectById(attachmentId);
         if (attachment == null) {

--
Gitblit v1.9.3