diff --git a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java index bcbba5b..3783bb3 100644 --- a/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java +++ b/api-admin/src/main/java/com/glxp/sale/admin/controller/sync/SyncController.java @@ -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 + "异常");