在实体类上添加注解 @TableLogic(value = "0", delval = "1")private Integer deleted; 在配置文件中配置全局逻辑删除 mybatis-plus: global-config: db-config: logic-delete-field: deleted #逻辑删除的字段 logic-delete-value: 1 # 已删除的值 logic-not-delete-value: 0 #未删除的值