feat(image): 添加图片清理功能- 新增 FileStorageService 用于文件上传、下载和删除操作- 实现 ImageCleanupService 清理冗余图片
- 添加 ImageCleanupController 提供手动清理图片的 API - 创建 ImageCleanupScheduler定时清理冗余图片 - 更新相关 Mapper 接口,增加必要的查询和删除方法
This commit is contained in:
@@ -3,6 +3,8 @@ package com.test.bijihoudaun.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.test.bijihoudaun.entity.Image;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ImageMapper extends BaseMapper<Image> {
|
||||
@@ -11,4 +13,11 @@ public interface ImageMapper extends BaseMapper<Image> {
|
||||
|
||||
// 自定义方法:根据Markdown文件ID获取关联图片
|
||||
// List<Image> findByMarkdownId(Integer markdownId);
|
||||
|
||||
/**
|
||||
* 获取所有图片记录
|
||||
* @return 所有图片列表
|
||||
*/
|
||||
@Select("SELECT * FROM image")
|
||||
List<Image> findAll();
|
||||
}
|
||||
Reference in New Issue
Block a user