0
点赞
收藏
分享

微信扫一扫

Mybatis-Plus常用注解


@TableName 说明表名


@TableName("sys_user")
public class User {
private Long id;
private String name;
private Integer age;
private String email;
}



​​@TableId​​

主键id字段上使用



​​@TableField​​ 数据库字段名

@TableName("sys_user")
public class User {
@TableId
private Long id;
@TableField("nickname")
private String name;
private Integer age;
private String email;
}


更多参考

​​https://baomidou.com/pages/223848/#idtype​​

举报

相关推荐

0 条评论