调用mybatisplus 批量更新接口,超级慢,主要是数据量大,就是updateBatchById这个接口,一个接口用时8s ,基本用时都在这个方法上面了,于是自己写了sql,问题解决!
第二种方法:在mysql配置面加上 rewriteBatchedStatements=true
url: jdbc:mysql://localhost:3306/xxxx?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=true&rewriteBatchedStatements=true