fix: 补充冲突文件

This commit is contained in:
wenjinbo 2025-09-17 08:46:43 +08:00
parent d2ab3d956f
commit 0455d6a53b
4 changed files with 27 additions and 0 deletions

View File

@ -175,4 +175,10 @@ public interface TDatasetFilesMapper {
* @return 影响行数
*/
int physicalDeleteByParentId(@Param("parentId") Long parentId);
/**
* 查询所有文件
*/
List<TDatasetFiles> selectAll();
}

View File

@ -153,4 +153,10 @@ public interface DatasetFilesService {
* @return 是否删除成功
*/
boolean physicalDeleteFilesByParentId(Long parentId);
/**
* 获取所有文件
*/
List<TDatasetFiles> getAllFiles();
}

View File

@ -403,4 +403,12 @@ public class DatasetFilesServiceImpl implements DatasetFilesService {
// 物理删除所有子文件/文件夹
return datasetFilesMapper.physicalDeleteByParentId(parentId) > 0;
}
/**
* 获取所有文件
*/
@Override
public List<TDatasetFiles> getAllFiles() {
return datasetFilesMapper.selectAll();
}
}

View File

@ -255,4 +255,11 @@
DELETE FROM t_dataset_files
WHERE parent_id = #{parentId}
</delete>
<!-- 查询所有文件 -->
<select id="selectAll" resultMap="TDatasetFilesResultMap">
SELECT <include refid="Base_Column_List"/>
FROM t_dataset_files
WHERE type = 'file'
ORDER BY created_at DESC
</select>
</mapper>