Mybatis-Plus查询的时候Java Bean的字段不是表中的,自动生成的查询语句要排除这些字段
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Book {
@TableId(type = IdType.AUTO)
private Integer book_id;
// 数据库字段对应Java Bean属性
@TableField(value = "book_name")
private String book_name;
// 排除字段,不是数据库中的字段
@TableField(exist = false)
private Integer auth_id;
@TableField(exist = false)
private String auth_name;
@TableField(value = "book_price")
private Double book_price;
@TableField(value = "book_classify")
private Integer book_classify;
@TableField(exist = false)
private String classify_name;
@TableField(value = "book_publish")
private Integer publish_id;
@TableField(exist = false)
private String publish_name;
@TableField(value = "book_is_delete")
private Boolean book_is_delete;
@TableField(value = "book_create_time")
private Date book_create_time;
@TableField(value = "book_count")
private Integer book_count;
@TableField(value = "book_sell")
private Integer book_sell;
}