报错:

deekseek多种解决方案,有些不适用,有些太复杂,选用MyBatis的解决方案。
如下:
public void batchUpdate(List<ChinaamcStaff> list) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
try {
YourMapper mapper = sqlSession.getMapper(YourMapper.class);
for (ChinaamcStaff item : list) {
mapper.updateByPrimaryKeySelective(item); // 单条更新
}
sqlSession.commit();
} finally {
sqlSession.close();
}
}