refactor(database): 更新数据库配置和实体映射
- 修改数据库连接URL地址 - 为所有实体类添加@TableField注解映射数据库字段 - 使用反引号标识符包裹表名和字段名 - 更新SQL查询语句使用明确字段列表 - 在配置文件中启用MyBatis安全模式防止SQL注入 - 添加MarkdownFileVO中groupingName字段的exist = false标识
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.test.bijihoudaun.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -8,7 +9,7 @@ import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@TableName("system_settings")
|
||||
@TableName("`system_settings`")
|
||||
@Schema(description = "系统设置实体")
|
||||
public class SystemSetting implements Serializable {
|
||||
|
||||
@@ -16,11 +17,14 @@ public class SystemSetting implements Serializable {
|
||||
|
||||
@TableId
|
||||
@Schema(description = "设置键", name = "settingKey")
|
||||
@TableField("`setting_key`")
|
||||
private String settingKey;
|
||||
|
||||
@Schema(description = "设置值", name = "settingValue")
|
||||
@TableField("`setting_value`")
|
||||
private String settingValue;
|
||||
|
||||
@Schema(description = "设置描述", name = "description")
|
||||
@TableField("`description`")
|
||||
private String description;
|
||||
}
|
||||
Reference in New Issue
Block a user