From 0455d6a53b01aa0b46c055cc82013b83a68baed6 Mon Sep 17 00:00:00 2001 From: wenjinbo <599483010@qq.com> Date: Wed, 17 Sep 2025 08:46:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A1=A5=E5=85=85=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../brichat/mapper/opengauss/TDatasetFilesMapper.java | 6 ++++++ .../com/bjtds/brichat/service/DatasetFilesService.java | 6 ++++++ .../brichat/service/impl/DatasetFilesServiceImpl.java | 8 ++++++++ .../brichat/mapper/opengauss/TDatasetFilesMapper.xml | 7 +++++++ 4 files changed, 27 insertions(+) diff --git a/chat-server/src/main/java/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.java b/chat-server/src/main/java/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.java index 4f4a421..8e4bb84 100644 --- a/chat-server/src/main/java/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.java +++ b/chat-server/src/main/java/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.java @@ -175,4 +175,10 @@ public interface TDatasetFilesMapper { * @return 影响行数 */ int physicalDeleteByParentId(@Param("parentId") Long parentId); + + /** + * 查询所有文件 + */ + List selectAll(); + } \ No newline at end of file diff --git a/chat-server/src/main/java/com/bjtds/brichat/service/DatasetFilesService.java b/chat-server/src/main/java/com/bjtds/brichat/service/DatasetFilesService.java index bbe6d97..18e50f3 100644 --- a/chat-server/src/main/java/com/bjtds/brichat/service/DatasetFilesService.java +++ b/chat-server/src/main/java/com/bjtds/brichat/service/DatasetFilesService.java @@ -153,4 +153,10 @@ public interface DatasetFilesService { * @return 是否删除成功 */ boolean physicalDeleteFilesByParentId(Long parentId); + + + /** + * 获取所有文件 + */ + List getAllFiles(); } \ No newline at end of file diff --git a/chat-server/src/main/java/com/bjtds/brichat/service/impl/DatasetFilesServiceImpl.java b/chat-server/src/main/java/com/bjtds/brichat/service/impl/DatasetFilesServiceImpl.java index 92ddf8f..2fbd4d3 100644 --- a/chat-server/src/main/java/com/bjtds/brichat/service/impl/DatasetFilesServiceImpl.java +++ b/chat-server/src/main/java/com/bjtds/brichat/service/impl/DatasetFilesServiceImpl.java @@ -403,4 +403,12 @@ public class DatasetFilesServiceImpl implements DatasetFilesService { // 物理删除所有子文件/文件夹 return datasetFilesMapper.physicalDeleteByParentId(parentId) > 0; } + + /** + * 获取所有文件 + */ + @Override + public List getAllFiles() { + return datasetFilesMapper.selectAll(); + } } \ No newline at end of file diff --git a/chat-server/src/main/resources/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.xml b/chat-server/src/main/resources/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.xml index 0181d23..b9b09a2 100644 --- a/chat-server/src/main/resources/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.xml +++ b/chat-server/src/main/resources/com/bjtds/brichat/mapper/opengauss/TDatasetFilesMapper.xml @@ -255,4 +255,11 @@ DELETE FROM t_dataset_files WHERE parent_id = #{parentId} + + \ No newline at end of file