• 实例类添加 deleted 字段
    • 并加上 @TableLogic注解 和 @TableField(fill = FieldFill.INSERT_UPDATE)注解 | package com.wzy.bootmtp.pojo;

    import com.baomidou.mybatisplus.annotation.;
    import lombok.AllArgsConstructor;
    import lombok.Data;
    @AllArgsConstructor
    @Data//生产get、set、toString等方法的注解
    public class User {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private Integer age;
    /
    @TableField(fill = FieldFill.UPDATE)
    @TableField(fill = FieldFill.INSERT)/
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String email;
    @Version
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer *version
    ;

    1. @TableLogic<br /> @TableField(fill = FieldFill.**INSERT_UPDATE**)<br /> **private **Integer **deleted**;<br />}

    | | —- |