feat(mapper): 添加物理删除功能并优化垃圾清理逻辑
- 在 GroupingMapper 和 MarkdownFileMapper 中添加物理删除方法 - 修改 TrashServiceImpl 中的 cleanTrash 方法,使用新增的物理删除方法 -优化了垃圾清理的 SQL 执行效率
This commit is contained in:
@@ -84,7 +84,7 @@ public class TrashServiceImpl implements TrashService {
|
||||
@Override
|
||||
@Transactional
|
||||
public void cleanTrash() {
|
||||
markdownFileMapper.delete(new QueryWrapper<MarkdownFile>().eq("is_deleted", 1));
|
||||
groupingMapper.delete(new QueryWrapper<Grouping>().eq("is_deleted", 1));
|
||||
markdownFileMapper.physicalDeleteByIsDeleted();
|
||||
groupingMapper.physicalDeleteByIsDeleted();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user