Commit 9bb35f73c242431171f8e065c971e0ae81ddbd27
1 parent
1ee5fb698a
Exists in
master
and in
6 other branches
同步
Showing 1 changed file with 8 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/SendMysqlSyncDatUtil.java
View file @
9bb35f7
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | 13 | import org.springframework.stereotype.Component; |
| 14 | 14 | |
| 15 | +import java.io.UnsupportedEncodingException; | |
| 15 | 16 | import java.util.HashSet; |
| 16 | 17 | import java.util.Set; |
| 17 | 18 | import java.util.concurrent.BlockingQueue; |
| ... | ... | @@ -56,9 +57,13 @@ |
| 56 | 57 | { |
| 57 | 58 | SqlRequest request = new SqlRequest(); |
| 58 | 59 | request.setSql(sql); |
| 59 | - request.setSqlId(sqlId); | |
| 60 | - syncSqlQueue.add(request); | |
| 61 | - System.out.println("syncSqlQueue size = " + syncSqlQueue.size()); | |
| 60 | + try { | |
| 61 | + request.setSqlId(Base64.encodeBase64String(sqlId.getBytes("utf-8"))); | |
| 62 | + syncSqlQueue.add(request); | |
| 63 | + System.out.println("syncSqlQueue size = " + syncSqlQueue.size()); | |
| 64 | + } catch (UnsupportedEncodingException e) { | |
| 65 | + e.printStackTrace(); | |
| 66 | + } | |
| 62 | 67 | } |
| 63 | 68 | |
| 64 | 69 |