Commit 3a7d2406b694c35ae1dc3715daccddfbbbc0ae40
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 1 changed file
platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/MysqlDataInterceptor.java
View file @
3a7d240
| ... | ... | @@ -103,7 +103,7 @@ |
| 103 | 103 | if (returnValue != null && returnValue instanceof ArrayList) |
| 104 | 104 | { |
| 105 | 105 | List<Integer> list = (ArrayList)returnValue; |
| 106 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 106 | + if (CollectionUtils.isNotEmpty(list) && isSyncTable(sql)) { | |
| 107 | 107 | System.out.println("add sync sql = " + sql); |
| 108 | 108 | SendMysqlSyncDatUtil.addSqlToQueue1(sql,sqlId); |
| 109 | 109 | sql = null; |
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 | |
| ... | ... | @@ -126,21 +126,19 @@ |
| 126 | 126 | */ |
| 127 | 127 | private boolean isSyncTable(String sql) |
| 128 | 128 | { |
| 129 | - boolean use = false; | |
| 130 | 129 | if (StringUtils.isEmpty(sql)) |
| 131 | 130 | { |
| 132 | - return use; | |
| 131 | + return false; | |
| 133 | 132 | } |
| 134 | 133 | for(String key : uses) |
| 135 | 134 | { |
| 136 | 135 | if (sql.toLowerCase().contains(key)) |
| 137 | 136 | { |
| 138 | - use = true; | |
| 139 | - break; | |
| 137 | + return true; | |
| 140 | 138 | } |
| 141 | 139 | } |
| 142 | 140 | |
| 143 | - return use; | |
| 141 | + return false; | |
| 144 | 142 | } |
| 145 | 143 | |
| 146 | 144 | public static String getSql(Configuration configuration, BoundSql boundSql, String sqlId) { |