mybatisPlus-逻辑删除
实体类字段上添加注解
@TableLogic private String status;
添加配置(不配置则默认1已删除,0未删除)
mybatis-plus.global-config.db-config.logic-delete-value=U
mybatis-plus.global-config.db-config.logic-not-delete-value=T
测试代码
@Test public void test2(){ int i = userMapper.deleteById(6L); System.out.println(i); }