|
|
@ -296,7 +296,6 @@ public class SqlTask extends AbstractTask { |
|
|
|
|
|
|
|
|
|
|
|
private String executeQuery(Connection connection, SqlBinds sqlBinds, String handlerType) throws Exception { |
|
|
|
private String executeQuery(Connection connection, SqlBinds sqlBinds, String handlerType) throws Exception { |
|
|
|
try (PreparedStatement statement = prepareStatementAndBind(connection, sqlBinds)) { |
|
|
|
try (PreparedStatement statement = prepareStatementAndBind(connection, sqlBinds)) { |
|
|
|
logger.info("{} statement execute query, for sql: {}", handlerType, sqlBinds.getSql()); |
|
|
|
|
|
|
|
ResultSet resultSet = statement.executeQuery(); |
|
|
|
ResultSet resultSet = statement.executeQuery(); |
|
|
|
return resultProcess(resultSet); |
|
|
|
return resultProcess(resultSet); |
|
|
|
} |
|
|
|
} |
|
|
@ -368,7 +367,7 @@ public class SqlTask extends AbstractTask { |
|
|
|
ParameterUtils.setInParameter(entry.getKey(), stmt, prop.getType(), prop.getValue()); |
|
|
|
ParameterUtils.setInParameter(entry.getKey(), stmt, prop.getType(), prop.getValue()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
logger.info("prepare statement replace sql : {} ", stmt); |
|
|
|
logger.info("prepare statement replace sql : {}, sql parameters : {}", sqlBinds.getSql(), sqlBinds.getParamsMap()); |
|
|
|
return stmt; |
|
|
|
return stmt; |
|
|
|
} catch (Exception exception) { |
|
|
|
} catch (Exception exception) { |
|
|
|
throw new TaskException("SQL task prepareStatementAndBind error", exception); |
|
|
|
throw new TaskException("SQL task prepareStatementAndBind error", exception); |
|
|
|