Mybatis-Plus执行查询的时候,排除某些字段
时间:2023-10-25 06:07:01
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; }