|
|
@ -299,8 +299,12 @@ public class SqlTask extends AbstractTask { |
|
|
|
while (resultSet.next()) { |
|
|
|
while (resultSet.next()) { |
|
|
|
JSONObject mapOfColValues = new JSONObject(true); |
|
|
|
JSONObject mapOfColValues = new JSONObject(true); |
|
|
|
for (int i = 1; i <= num; i++) { |
|
|
|
for (int i = 1; i <= num; i++) { |
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(md.getColumnLabel(i))) { |
|
|
|
|
|
|
|
mapOfColValues.put(md.getColumnLabel(i), resultSet.getObject(i)); |
|
|
|
|
|
|
|
} else { |
|
|
|
mapOfColValues.put(md.getColumnName(i), resultSet.getObject(i)); |
|
|
|
mapOfColValues.put(md.getColumnName(i), resultSet.getObject(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
resultJSONArray.add(mapOfColValues); |
|
|
|
resultJSONArray.add(mapOfColValues); |
|
|
|
} |
|
|
|
} |
|
|
|
logger.debug("execute sql : {}", JSON.toJSONString(resultJSONArray, SerializerFeature.WriteMapNullValue)); |
|
|
|
logger.debug("execute sql : {}", JSON.toJSONString(resultJSONArray, SerializerFeature.WriteMapNullValue)); |
|
|
|