Merge branch 'master' into test

test
wj 2 years ago
commit 631e9004ab

@ -67,17 +67,15 @@ public class SyncController {
*/
@GetMapping("/udispsync/sync/testConnection")
public BaseResponse testConnection(HttpServletRequest request) {
String uri = uriUtils.parseUri(request.getRequestURL().toString());
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
if (StrUtil.isNotEmpty(upperServerHost)) {
uri = upperServerHost + "/" + uri;
upperServerHost = upperServerHost + "/udispsync/sync/testConnection";
} else {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK.getCode(), request.getLocalAddr() + "服务缺少上级服务IP");
}
uri = changeUri(uri);
JSONObject jsonObject = null;
try {
jsonObject = redirect(request, uri);
jsonObject = redirect(request, upperServerHost);
} catch (Exception e) {
e.printStackTrace();
return ResultVOUtils.error(ResultEnum.NOT_NETWORK.getCode(), request.getLocalAddr() + "服务访问上级服务" + upperServerHost + "异常");

Loading…
Cancel
Save