Explorar o código

fix: 重复 file 路径 Bug

gaibu %!s(int64=2) %!d(string=hai) anos
pai
achega
639c7820f9

+ 1 - 1
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/file/FileContentDAOImpl.java

@@ -30,7 +30,7 @@ public class FileContentDAOImpl implements DBFileContentFrameworkDAO {
     @Override
     public byte[] selectContent(Long configId, String path) {
         List<FileContentDO> fileContentDOs = fileContentMapper.selectList(
-                buildQuery(configId, path).select(FileContentDO::getContent));
+                buildQuery(configId, path).select(FileContentDO::getContent).orderByDesc(FileContentDO::getId));
         return CollUtil.isNotEmpty(fileContentDOs) ? CollUtil.getFirst(fileContentDOs).getContent() : null;
     }