Commit 639c7820f92e0368e94f63a762f9ef5fc96e44ec
1 parent
9a468600
fix: 重复 file 路径 Bug
Showing
1 changed file
with
1 additions
and
1 deletions
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 | 30 | @Override |
| 31 | 31 | public byte[] selectContent(Long configId, String path) { |
| 32 | 32 | List<FileContentDO> fileContentDOs = fileContentMapper.selectList( |
| 33 | - buildQuery(configId, path).select(FileContentDO::getContent)); | |
| 33 | + buildQuery(configId, path).select(FileContentDO::getContent).orderByDesc(FileContentDO::getId)); | |
| 34 | 34 | return CollUtil.isNotEmpty(fileContentDOs) ? CollUtil.getFirst(fileContentDOs).getContent() : null; |
| 35 | 35 | } |
| 36 | 36 | ... | ... |