fix:废除标签时同时废除标签关联关系

This commit is contained in:
s2042968 2025-04-11 17:16:32 +08:00
parent 346b971481
commit 821f4adfc1
1 changed files with 2 additions and 0 deletions

View File

@ -202,6 +202,8 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
} }
// 删除本身 // 删除本身
boolean isDeleted = this.removeById(tagId); boolean isDeleted = this.removeById(tagId);
// 删除本身的关联关系
fileTagRelationMapper.delete(new LambdaQueryWrapper<FileTagRelation>().eq(FileTagRelation::getTagId, tagId));
if (isDeleted) { if (isDeleted) {
UserThreadLocal.setSuccessInfo("", tagId, StrFormatter.format("删除了标签 {} ", tag.getTagName())); UserThreadLocal.setSuccessInfo("", tagId, StrFormatter.format("删除了标签 {} ", tag.getTagName()));
} }