code: public static String getMapperSql(SqlSession session, Class<?> mapperInterface, String methodName, Object... args) {
          String fullMapperMethodName = mapperInterface.getCanonicalName() + "." + methodName;
          if (args == null || args.length == 0) {
              return getNamespaceSql(session, fullMapperMethodName, null);
          }
          Method method = getDeclaredMethods(mapperInterface, methodName);
          Map<String, Object> params = new HashMap<>(16);
          final Class<?>[] argTypes = method.getParameterTypes();
          for (int i = 0; i < argTypes.length; i++) {
              if (!RowBounds.class.isAssignableFrom(argTypes[i]) && !ResultHandler.class.isAssignableFrom
                      (argTypes[i])) {
                  String paramName = "param" + String.valueOf(params.size() + 1);
                  paramName = getParamNameFromAnnotation(method, i, paramName);
                  params.put(paramName, i >= args.length ? null : args[i]);
              }
          }
          if (args.length == 1) {
              Object unParams = wrapCollection(args[0]);
              if (unParams instanceof Map) {
                  @SuppressWarnings("unchecked")
                  Map<String, Object> unParams2 = (Map<String, Object>) unParams;
                  params.putAll(unParams2);
              }
          }
          return getNamespaceSql(session, fullMapperMethodName, params);
      }
docs: 通过Mapper接口和方法名