Commit 639c7820f92e0368e94f63a762f9ef5fc96e44ec

Authored by gaibu
1 parent 9a468600

fix: 重复 file 路径 Bug

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