Commit 13c50b597f377acdeb55ab454f6e89e1a491b232
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 1 changed file
platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MybatisSqlInterceptor.java
View file @
13c50b5
... | ... | @@ -25,9 +25,13 @@ |
25 | 25 | * Created by Administrator on 2017-04-24. |
26 | 26 | */ |
27 | 27 | @Intercepts({ |
28 | - @Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) }) | |
28 | + @Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) | |
29 | + | |
30 | + }) | |
29 | 31 | public class MybatisSqlInterceptor implements Interceptor { |
30 | 32 | |
33 | + | |
34 | +// @Signature(type= ResultSetHandler.class, method = "handleResultSets", args = {Statement.class}) | |
31 | 35 | private Properties properties; |
32 | 36 | |
33 | 37 | public Object intercept(Invocation invocation) throws Throwable { |
34 | 38 | |
... | ... | @@ -36,10 +40,13 @@ |
36 | 40 | if (invocation.getArgs().length > 1) { |
37 | 41 | parameter = invocation.getArgs()[1]; |
38 | 42 | } |
43 | + | |
39 | 44 | String sqlId = mappedStatement.getId(); |
40 | 45 | BoundSql boundSql = mappedStatement.getBoundSql(parameter); |
41 | 46 | Configuration configuration = mappedStatement.getConfiguration(); |
42 | 47 | Object returnValue = invocation.proceed(); |
48 | + System.out.println("mysql result ======" + returnValue); | |
49 | + System.out.println(mappedStatement.getResulSets()); | |
43 | 50 | String sql = getSql(configuration, boundSql, sqlId); |
44 | 51 | System.out.println("mysql sql ======" + sql); |
45 | 52 | return returnValue; |