// 更新统计信息
for (int i = 0; i < splitDatas.size(); i++) {
processStat(splitDatas.get(i), affects[i], true);
}
} else {
final EventData data = splitDatas.get(0);// 直接取第一条
int affect = 0;
affect = (Integer) dbDialect.getTransactionTemplate().execute(new TransactionCallback() {
public Object doInTransaction(TransactionStatus status) {
try {
failedDatas.clear(); // 先清理
processedDatas.clear();
interceptor.transactionBegin(context, Arrays.asList(data), dbDialect);
JdbcTemplate template = dbDialect.getJdbcTemplate();
int affect = template.update(data.getSql(), new PreparedStatementSetter() {
public void setValues(PreparedStatement ps) throws SQLException {
doPreparedStatement(ps, dbDialect, lobCreator, data);
}
});