3.20优化

This commit is contained in:
2025-03-20 15:22:06 +08:00
parent 7ce41a73f6
commit 7fcb637b1e
19 changed files with 126 additions and 46 deletions

View File

@ -138,7 +138,8 @@ public class AnnexServiceImpl extends ServicePlusImpl<AnnexMapper, Annex> implem
Annex annex = baseMapper.selectById(id);
//2、删除对应的数据并删除相对应的资源
if (baseMapper.deleteById(id)>0){
boolean b = fileDeletionService.deleteFileByPath(annex.getAnnexUrl());
String s = annex.getAnnexUrl().replaceAll("/profile", "ruoyi/uploadPath");
boolean b = fileDeletionService.deleteFileByPath(s);
if(!b){
throw new RuntimeException("附件删除失败!");
}