refactor(database): 更新数据库配置和实体映射
- 修改数据库连接URL地址 - 为所有实体类添加@TableField注解映射数据库字段 - 使用反引号标识符包裹表名和字段名 - 更新SQL查询语句使用明确字段列表 - 在配置文件中启用MyBatis安全模式防止SQL注入 - 添加MarkdownFileVO中groupingName字段的exist = false标识
This commit is contained in:
@@ -18,6 +18,6 @@ public interface ImageMapper extends BaseMapper<Image> {
|
||||
* 获取所有图片记录
|
||||
* @return 所有图片列表
|
||||
*/
|
||||
@Select("SELECT * FROM image")
|
||||
@Select("SELECT id, markdown_id, original_name, stored_name, `url`, `size`, content_type, created_at FROM `image`")
|
||||
List<Image> findAll();
|
||||
}
|
||||
Reference in New Issue
Block a user