Commit 4fc95c4c008e56a13ba6540ef02b695054685dc9
1 parent
2ff6ec3ca3
Exists in
master
and in
6 other branches
update code
Showing 3 changed files with 12 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
4fc95c4
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
4fc95c4
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/SyncDataTaskService.java
View file @
4fc95c4
... | ... | @@ -136,7 +136,7 @@ |
136 | 136 | public void run() { |
137 | 137 | try{ |
138 | 138 | System.out.println(DateUtil.getyyyy_MM_dd_hms(new Date()) +" ; request url = " + url); |
139 | - String json = HttpClientUtil.doPost("https://"+url+"/findSyncData", new HashMap<String, String>(), "utf-8"); | |
139 | + String json = excePost("https://" + url + "/findSyncData", new HashMap<String, String>()); | |
140 | 140 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(json)) |
141 | 141 | { |
142 | 142 | List<SyncDataModel> list = JsonUtil.toList(json, SyncDataModel.class); |
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | if (ids.length() > 0) { |
166 | 166 | Map<String,String> params = new HashMap<String, String>(); |
167 | 167 | params.put("ids", ids.toString()); |
168 | - HttpClientUtil.doPost("https://" + url + "/updateSyncData", params, "utf-8"); | |
168 | + excePost("https://" + url + "/updateSyncData", params); | |
169 | 169 | } |
170 | 170 | } |
171 | 171 | } |
... | ... | @@ -178,6 +178,13 @@ |
178 | 178 | } |
179 | 179 | }); |
180 | 180 | } |
181 | + } | |
182 | + | |
183 | + | |
184 | + private synchronized String excePost(String url,Map<String,String> param) | |
185 | + { | |
186 | + String json = HttpClientUtil.doPost(url, param, "utf-8"); | |
187 | + return json; | |
181 | 188 | } |
182 | 189 | |
183 | 190 |