使用方法:
1、MyBatisPlusConfig中配置
/**
* 逻辑删除插件
*/
@Bean
public ISqlInjector sqlInjector() {
return new LogicSqlInjector();
}
2、加注解
@TableLogic
private Boolean isDeleted;
3、controller中
@DeleteMapping("{id}")
public boolean removeById(@PathVariable String id){
return teacherService.removeById(id);
}