@Override
	public int[] doInPreparedStatement(PreparedStatement ps) throws SQLException {
		int batchSize = argsList.size();
		// 判断JDBC是否支持批量更新，如果支持直接调用批量执行方法，否则逐行执行。
		if (JdbcUtils.supportsBatchUpdates(ps.getConnection())) {
			for (int i = 0; i < batchSize; i++) {
				setParameterValue(ps, argsList, i);
				ps.addBatch();
			}
			int[] rows = ps.executeBatch();
			return processBatchResult(ps, rows, true, generatedKeyHolder);
		} else {
			List<Integer> rowsAffected = new ArrayList<Integer>();
			int[] rows = new int[1];
			for (int i = 0; i < batchSize; i++) {
				setParameterValue(ps, argsList, i);
				int rowAffected = ps.executeUpdate();
				rows[0] = rowAffected;
				rowsAffected.add(rowAffected);
				processBatchResult(ps, rows, (i == 0), generatedKeyHolder); // 第一次清空KeyHolder
			}
			return processAffectedArray(rowsAffected);
		}
	}