提交 9b6ab81e 编写于 作者: R Rubik-W 提交者: gaojun2048

fix #2334 (#2335)

Co-authored-by: Ndailidong <dailidong66@gmail.com>
上级 d8c7a44e
......@@ -309,8 +309,12 @@ public class SqlTask extends AbstractTask {
while (resultSet.next()) {
JSONObject mapOfColValues = new JSONObject(true);
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));
}
}
resultJSONArray.add(mapOfColValues);
}
logger.debug("execute sql : {}", JSON.toJSONString(resultJSONArray, SerializerFeature.WriteMapNullValue));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册