Commit 56b6da36 authored by Quxl's avatar Quxl

x

parent 14e84782
...@@ -8,6 +8,7 @@ import java.util.LinkedHashMap; ...@@ -8,6 +8,7 @@ import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.egolm.common.StringUtil;
import com.egolm.common.Util; import com.egolm.common.Util;
import com.egolm.common.jdbc.dialect.bean.Desc; import com.egolm.common.jdbc.dialect.bean.Desc;
import com.egolm.common.jdbc.exception.MustBeOneRowException; import com.egolm.common.jdbc.exception.MustBeOneRowException;
...@@ -33,7 +34,11 @@ public class JUtil { ...@@ -33,7 +34,11 @@ public class JUtil {
while (resultSet.next()) { while (resultSet.next()) {
Map<String, Object> rowData = new LinkedHashMap<String, Object>(); Map<String, Object> rowData = new LinkedHashMap<String, Object>();
for (int i = 1; i <= columnCount; i++) { for (int i = 1; i <= columnCount; i++) {
rowData.put(md.getColumnName(i), resultSet.getObject(i)); String columnLabel = md.getColumnLabel(i);
if(StringUtil.isBlank(columnLabel)) {
columnLabel = md.getColumnName(i);
}
rowData.put(columnLabel, resultSet.getObject(i));
} }
datas.add(rowData); datas.add(rowData);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment