3.20优化
This commit is contained in:
@ -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("附件删除失败!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user