Commit 2423e4df80007dec6b7d1a2bc93e6df79d901840

Authored by liquanyu
1 parent 6e2fa199dd

update code

Showing 3 changed files with 12 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SyncDataController.java View file @ 2423e4d
... ... @@ -108,7 +108,7 @@
108 108 writeString(response, "execSyncMysqlData fail");
109 109 ExceptionUtils.catchException(e,"execSyncMysqlData fail");
110 110 }
111   - writeString(response,"execSyncMysqlData success");
  111 + writeString(response,"success");
112 112 }
113 113  
114 114 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HttpClientUtil.java View file @ 2423e4d
... ... @@ -151,6 +151,7 @@
151 151 } catch (Exception e) {
152 152 ExceptionUtils.catchException(e,"error https post ");
153 153 e.printStackTrace();
  154 + return null;
154 155 } finally {
155 156 if (response != null) {
156 157 try {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/SendMysqlSyncDatUtil.java View file @ 2423e4d
... ... @@ -85,8 +85,16 @@
85 85 {
86 86 for(String url : urls)
87 87 {
88   - String result = HttpClientUtil.doPostSSL(url,json,"3d19960bf3e81e7d816c4f26051c49ba");
89   - System.out.println("sync mysql result = " + result);
  88 + for (int i = 0 ; i < 3 ; i++)
  89 + {
  90 + String result = HttpClientUtil.doPostSSL(url,json,"3d19960bf3e81e7d816c4f26051c49ba");
  91 + System.out.println("sync mysql result = " + result+";url="+url);
  92 + if (result == null)
  93 + {
  94 + continue;
  95 + }
  96 + break;
  97 + }
90 98 }
91 99 }
92 100 } catch (Exception e) {