PHP笔记网

革命尚未成功,同志仍须努力下载JDK17

作者:Albert.Wen  添加时间:2022-12-13 23:40:04  修改时间:2024-11-25 09:50:34  分类:06.Java框架/系统  编辑

1、原来内容:

@Data
@TableName("db_leads")
public class Leads {

    @TableId(value = "id", type = IdType.AUTO)
    private int id;

    @TableField("leads_name")
    private int leadsName;

    @TableField("name")
    private String name;

    @TableField("address")
    private String address;
}

2、更改内容(int —> Integer):

private int id;
private Integer id;

3、最后结果:

@Data
@TableName("db_leads")
public class Leads {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("leads_name")
    private int leadsName;

    @TableField("name")
    private String name;

    @TableField("address")
    private String address;
}

 

 

参考:https://blog.csdn.net/lydms/article/details/118523445