From 15d2991e7afc29413f76a36c64de84df2d00d454 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Thu, 27 Apr 2017 21:41:40 +0800 Subject: [PATCH] update code --- .../operate/web/inteceptor/MybatisSqlInterceptor.java | 16 ++++++++-------- pom.xml | 8 +++++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MybatisSqlInterceptor.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MybatisSqlInterceptor.java index 093eb92..d388f8f 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MybatisSqlInterceptor.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MybatisSqlInterceptor.java @@ -60,22 +60,22 @@ public class MybatisSqlInterceptor implements Interceptor { Configuration configuration = mappedStatement.getConfiguration(); sqlCommandType = mappedStatement.getSqlCommandType().name(); - if (!(sql.toUpperCase().contains("LIS_REPORT_TBL") || sql.toUpperCase().contains("RIS_REPORT_TBL"))) - { if ("update".equals(sqlCommandType.toLowerCase()) || "delete".equals(sqlCommandType.toLowerCase())) { - sql = getSql(configuration, boundSql, sqlId); - System.out.println("delete and update sync sql = "+sql); - //发送要同步的sql - SendMysqlSyncDatUtil.sendSql(sql, sqlId); - sql = null; + if (!(sql.toUpperCase().contains("LIS_REPORT_TBL") || sql.toUpperCase().contains("RIS_REPORT_TBL"))) { + + sql = getSql(configuration, boundSql, sqlId); + System.out.println("delete and update sync sql = " + sql); + //发送要同步的sql + SendMysqlSyncDatUtil.sendSql(sql, sqlId); + sql = null; + } } else if ("insert".equals(sqlCommandType.toLowerCase()) ) { sql = getSql(configuration, boundSql, sqlId); } - } System.out.println("sqlCommandType = "+sqlCommandType+":mysql sql =" + sql); returnValue = invocation.proceed(); diff --git a/pom.xml b/pom.xml index 387c0ea..b4e3d25 100644 --- a/pom.xml +++ b/pom.xml @@ -544,5 +544,11 @@ commons-dbutils 1.6 + + + + + + - \ No newline at end of file + -- 1.8.3.1