liurunyu
2025-03-21 fb50c6c8111fffd16091ce25d5d389ea3fcc560f
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mybatis/PrintSqlInterceptor.java
@@ -51,16 +51,10 @@
            MappedStatement mappedStatement = (MappedStatement) args[0];
            Object parameter = args[1];
            //BoundSql boundSql = mappedStatement.getBoundSql(parameter);
            //String sql = boundSql.getSql();
            //log.info("\n\nSQL:\n" + sql + "\n");
            String sqlId = mappedStatement.getId();
            BoundSql boundSql = mappedStatement.getBoundSql(parameter);
            Configuration configuration = mappedStatement.getConfiguration();
            log.info("SQL Parameters: {}", boundSql.getParameterObject());
            log.info("SQL Id: {}", sqlId);
            log.info("SQL: {}", PrintSqlHelp.getFullSql(configuration, boundSql));
            log.info("\nSQL Id: " + sqlId + "\nSQL Parameters: " + boundSql.getParameterObject() + "\nSQL: " + PrintSqlHelp.getFullSql(configuration, boundSql) + "\n");
        }
        return invocation.proceed();