Ver código fonte

更新 MybatisMapperAnnotationBuilder 代码

miemie 6 anos atrás
pai
commit
6b0c2e6e59

+ 2 - 10
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisMapperAnnotationBuilder.java

@@ -324,15 +324,7 @@ public class MybatisMapperAnnotationBuilder extends MapperAnnotationBuilder {
             String resultMapId = null;
             String resultMapId = null;
             ResultMap resultMapAnnotation = method.getAnnotation(ResultMap.class);
             ResultMap resultMapAnnotation = method.getAnnotation(ResultMap.class);
             if (resultMapAnnotation != null) {
             if (resultMapAnnotation != null) {
-                String[] resultMaps = resultMapAnnotation.value();
-                StringBuilder sb = new StringBuilder();
-                for (String resultMap : resultMaps) {
-                    if (sb.length() > 0) {
-                        sb.append(",");
-                    }
-                    sb.append(resultMap);
-                }
-                resultMapId = sb.toString();
+                resultMapId = String.join(",", resultMapAnnotation.value());
             } else if (isSelect) {
             } else if (isSelect) {
                 resultMapId = parseResultMap(method);
                 resultMapId = parseResultMap(method);
             }
             }
@@ -371,7 +363,7 @@ public class MybatisMapperAnnotationBuilder extends MapperAnnotationBuilder {
         if (lang != null) {
         if (lang != null) {
             langClass = lang.value();
             langClass = lang.value();
         }
         }
-        return assistant.getLanguageDriver(langClass);
+        return configuration.getLanguageDriver(langClass);
     }
     }
 
 
     private Class<?> getParameterType(Method method) {
     private Class<?> getParameterType(Method method) {