code: public static String getMapperSql(Object mapper, String methodName, Object... args) {
          MetaObject metaObject = SystemMetaObject.forObject(mapper);
          SqlSession session = (SqlSession) metaObject.getValue("h.sqlSession");
          Class<?> mapperInterface = (Class<?>) metaObject.getValue("h.mapperInterface");
          String fullMethodName = mapperInterface.getCanonicalName() + "." + methodName;
          if (args == null || args.length == 0) {
              return getNamespaceSql(session, fullMethodName, null);
          } else {
              return getMapperSql(session, mapperInterface, methodName, args);
          }
      }
docs: 通过接口获取sql