diff --git a/src/main/java/neatlogic/framework/sqlrunner/SqlRunner.java b/src/main/java/neatlogic/framework/sqlrunner/SqlRunner.java index 697a543dd0df2bb0f3077daed49e9a0a7f90c4d1..c25dff7f19a3b5a13d32b392a9e7da5275977b44 100644 --- a/src/main/java/neatlogic/framework/sqlrunner/SqlRunner.java +++ b/src/main/java/neatlogic/framework/sqlrunner/SqlRunner.java @@ -201,8 +201,17 @@ public class SqlRunner { ResultMap resultMap = resultMaps.get(0); sqlInfo.setResultMap(resultMap.getId()); sqlInfo.setResultType(resultMap.getType().getName()); - sqlInfo.setColumnList(new ArrayList<>(resultMap.getMappedColumns())); - sqlInfo.setPropertyList(new ArrayList<>(resultMap.getMappedProperties())); + List columnList = new ArrayList<>(); + List propertyList = new ArrayList<>(); + List resultMappings = resultMap.getResultMappings(); + if (CollectionUtils.isNotEmpty(resultMappings)) { + for (ResultMapping resultMapping : resultMappings) { + columnList.add(resultMapping.getColumn()); + propertyList.add(resultMapping.getProperty()); + } + } + sqlInfo.setColumnList(columnList); + sqlInfo.setPropertyList(propertyList); } Integer timeout = mappedStatement.getTimeout(); sqlInfo.setTimeout(timeout);