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