确认
当前程序版本
mybatisplus-3.5.3.1
问题描述
我在程序中处理了一个拦截器 ,用来记录一些数据 @Service @Intercepts({ @Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class}) }) public class My implements Interceptor { @Override public Object intercept(Invocation invocation) throws Throwable { try { Object[] args = invocation.getArgs(); MappedStatement mappedStatement = (MappedStatement) args[0]; if (checkMappedStatement(mappedStatement)){
e.submit(() -> {
try {
Object parameter = null;
if (invocation.getArgs().length > 1) {
parameter = invocation.getArgs()[1];
}
BoundSql boundSql = mappedStatement.getBoundSql(invocation.getArgs()[1]);
String originalSql = boundSql.getSql();
/process
} catch (Exception e) {
}
});
}
}
} catch (Exception ignore) {
}
return invocation.proceed();
}
} }
里面生成了一些数据 ,但是我发现在这种情况下 ,莫名会有update语句类似丢失where条件导致全表修改, 这是为什么呢? 按理说我收到数据会直接写入线程池后返回proceed,为什么会有这种问题发生呢
详细堆栈日志