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 { // 自定义方法:根据用户ID获取图片列表 // List findByUserId(Integer userId); // 自定义方法:根据Markdown文件ID获取关联图片 // List findByMarkdownId(Integer markdownId); /** * 获取所有图片记录 * @return 所有图片列表 */ @Select("SELECT id, markdown_id, original_name, stored_name, `url`, `size`, content_type, created_at FROM `image`") List findAll(); }