注解的使用
1.如果entity 和 数据库表明不一致
可以用@TableName来指定表名
@TableName("nlp_dic_keyword")
public class NlpDicKeyword
2.如果变量名和表字段不一致 可以用@TableField来指定映射对应的字段名。MyBatis-Plus可以自动转义下划线和CamelCase ex:topicId, topic_id, 这里其实没有必须写注释。
@TableField("topic_id")
private Long topicId ;
3.@TableField(exist = false)
entity中出现了表中没有的变量
@TableField(exist = false)
private String remark;