Skip to content

Commit

Permalink
fix:issues-I9134E
Browse files Browse the repository at this point in the history
多个字段取值冲突
  • Loading branch information
Casonhqc committed Feb 18, 2024
1 parent 92b69c1 commit bdcdb31
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ public void postTableInfo(TableInfo tableInfo, Configuration configuration) {
}
ResultMap resultMap = configuration.getResultMap(tableInfo.getResultMap());
for (ResultMapping resultMapping : resultMap.getResultMappings()) {
TypeHandler<?> handler = resultMapping.getTypeHandler();
if (handler instanceof AbstractJsonFieldHandler) {
AbstractJsonFieldHandler<?> typeHandler = (AbstractJsonFieldHandler<?>) handler;
typeHandler.setTableInfo(tableInfo);
typeHandler.setFieldInfo(fieldInfo);
if (resultMapping.getProperty().equalsIgnoreCase(fieldInfo.getProperty())) {
TypeHandler<?> handler = resultMapping.getTypeHandler();
if (handler instanceof AbstractJsonFieldHandler) {
AbstractJsonFieldHandler<?> typeHandler = (AbstractJsonFieldHandler<?>) handler;
typeHandler.setTableInfo(tableInfo);
typeHandler.setFieldInfo(fieldInfo);
}
}
}
}
Expand Down

0 comments on commit bdcdb31

Please sign in to comment.