|
|
@ -11,10 +11,7 @@ import com.glxp.sale.admin.idc.utils.UriUtils;
|
|
|
|
import com.glxp.sale.admin.service.param.SystemParamConfigService;
|
|
|
|
import com.glxp.sale.admin.service.param.SystemParamConfigService;
|
|
|
|
import com.glxp.sale.admin.service.sync.BasicExportService;
|
|
|
|
import com.glxp.sale.admin.service.sync.BasicExportService;
|
|
|
|
import com.glxp.sale.admin.service.sync.BasicUploadService;
|
|
|
|
import com.glxp.sale.admin.service.sync.BasicUploadService;
|
|
|
|
import com.glxp.sale.admin.util.Constant;
|
|
|
|
import com.glxp.sale.admin.util.*;
|
|
|
|
import com.glxp.sale.admin.util.DateUtil;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.util.FileUtils;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.util.GennerOrderUtils;
|
|
|
|
|
|
|
|
import com.glxp.sale.common.res.BaseResponse;
|
|
|
|
import com.glxp.sale.common.res.BaseResponse;
|
|
|
|
import com.glxp.sale.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.sale.common.util.ResultVOUtils;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@ -77,12 +74,12 @@ public class SyncController {
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
uri = uri.replace("orderApi/", "");
|
|
|
|
uri = uri.replace("orderApi/", "");
|
|
|
|
uri = changeUri(uri);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uri = changeUri(uri);
|
|
|
|
JSONObject jsonObject = redirect(request, uri);
|
|
|
|
JSONObject jsonObject = redirect(request, uri);
|
|
|
|
return jsonObject;
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -95,13 +92,12 @@ public class SyncController {
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
uri = uri.replace("busOrderApi/", "");
|
|
|
|
uri = uri.replace("busOrderApi/", "");
|
|
|
|
uri = changeUri(uri);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uri = changeUri(uri);
|
|
|
|
JSONObject jsonObject = redirect(request, uri);
|
|
|
|
JSONObject jsonObject = redirect(request, uri);
|
|
|
|
return jsonObject;
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -143,12 +139,12 @@ public class SyncController {
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
uri = uri.replace("syncToSpms/", "");
|
|
|
|
uri = uri.replace("syncToSpms/", "");
|
|
|
|
uri = changeUri(uri);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uri = changeUri(uri);
|
|
|
|
JSONObject jsonObject = redirect(request, uri);
|
|
|
|
JSONObject jsonObject = redirect(request, uri);
|
|
|
|
return jsonObject;
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -160,12 +156,13 @@ public class SyncController {
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
String isTopService = systemParamConfigService.selectValueByParamKey("is_top_service");
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
if (StrUtil.isNotEmpty(isTopService) && isTopService.equals("1")) {
|
|
|
|
uri = uri.replace("directToSpms/", "");
|
|
|
|
uri = uri.replace("directToSpms/", "");
|
|
|
|
uri = changeUri(uri);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
String upperServerHost = systemParamConfigService.selectValueByParamKey("upper_server_ip");
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
if (StrUtil.isNotEmpty(upperServerHost)) {
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
uri = upperServerHost + "/" + uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
uri = changeUri(uri);
|
|
|
|
|
|
|
|
log.error(uri);
|
|
|
|
JSONObject jsonObject = redirectNolog(request, uri);
|
|
|
|
JSONObject jsonObject = redirectNolog(request, uri);
|
|
|
|
return jsonObject;
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -268,9 +265,12 @@ public class SyncController {
|
|
|
|
if (uri.contains("SP_SYNC_SERVER")) {
|
|
|
|
if (uri.contains("SP_SYNC_SERVER")) {
|
|
|
|
uri = uri.replace("SP_SYNC_SERVER/", "");
|
|
|
|
uri = uri.replace("SP_SYNC_SERVER/", "");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
uri = MyStrUtil.deDup(uri);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.error("changeUri = " + uri);
|
|
|
|
log.error("changeUri = " + uri);
|
|
|
|
return uri;
|
|
|
|
return uri;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|