Commit e97cf1985994010dd0486718c14d7d27acd0ae6e
1 parent
f658316c06
Exists in
master
and in
6 other branches
update code
Showing 1 changed file with 9 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MybatisSqlInterceptor.java
View file @
e97cf19
| ... | ... | @@ -60,21 +60,20 @@ |
| 60 | 60 | Configuration configuration = mappedStatement.getConfiguration(); |
| 61 | 61 | sqlCommandType = mappedStatement.getSqlCommandType().name(); |
| 62 | 62 | |
| 63 | - if (!(sql == null || sql.toUpperCase().contains("LIS_REPORT_TBL") || sql.toUpperCase().contains("RIS_REPORT_TBL"))) | |
| 63 | + if (!(sql.toUpperCase().contains("LIS_REPORT_TBL") || sql.toUpperCase().contains("RIS_REPORT_TBL"))) | |
| 64 | 64 | { |
| 65 | - if ("insert".equals(sqlCommandType.toLowerCase())) | |
| 65 | + | |
| 66 | + if ("update".equals(sqlCommandType.toLowerCase()) || "delete".equals(sqlCommandType.toLowerCase())) | |
| 66 | 67 | { |
| 67 | 68 | sql = getSql(configuration, boundSql, sqlId); |
| 69 | + System.out.println("delete and update sync sql = "+sql); | |
| 70 | + //发送要同步的sql | |
| 71 | + SendMysqlSyncDatUtil.sendSql(sql, sqlId); | |
| 72 | + sql = null; | |
| 68 | 73 | } |
| 69 | - else | |
| 74 | + else if ("insert".equals(sqlCommandType.toLowerCase()) ) | |
| 70 | 75 | { |
| 71 | - if ("update".equals(sqlCommandType.toLowerCase()) || "delete".equals(sqlCommandType.toLowerCase())) | |
| 72 | - { | |
| 73 | - System.out.println("delete and update sync sql = "+sql); | |
| 74 | - //发送要同步的sql | |
| 75 | - SendMysqlSyncDatUtil.sendSql(sql, sqlId); | |
| 76 | - sql = null; | |
| 77 | - } | |
| 76 | + sql = getSql(configuration, boundSql, sqlId); | |
| 78 | 77 | } |
| 79 | 78 | } |
| 80 | 79 |