https://www.toutiao.com/a7025459579328741924/?log_from=8a8f5b7f5de1a_1640749541015
前提使用Mybatis-plus
测试1:测试前displayd = 1 ==>测试后任为1 发生了回滚
@Override @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public void updateFactory(String factoryId) { lambdaUpdate().eq(FactoryPO::getId, factoryId) .set(FactoryPO::getDisplayd, Boolean.FALSE) .update(); String str = null; str.equals(factoryId); }