From 51289647136ea3989f29378037e514bdb1f5f1ae Mon Sep 17 00:00:00 2001 From: ljl Date: Fri, 1 Dec 2023 14:20:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ms-biz/src/main/java/com/ms/biz/util/DDApi.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ms-biz/src/main/java/com/ms/biz/util/DDApi.java b/ms-biz/src/main/java/com/ms/biz/util/DDApi.java index f3c6591..71b86cc 100644 --- a/ms-biz/src/main/java/com/ms/biz/util/DDApi.java +++ b/ms-biz/src/main/java/com/ms/biz/util/DDApi.java @@ -41,6 +41,7 @@ import com.doudian.open.api.supplyCenter_refund_operate.param.SupplyCenterRefund import com.doudian.open.core.DoudianOpRequest; import com.doudian.open.core.GlobalConfig; import com.ms.biz.tool.CommonTool; +import com.ms.biz.tool.SystemTool; import lombok.extern.slf4j.Slf4j; import java.text.SimpleDateFormat; @@ -152,10 +153,12 @@ public class DDApi { // GlobalConfig.getGlobalConfig().addHttpRequestHeader("Origin-From", "djt_prod"); // GlobalConfig.getGlobalConfig().addHttpRequestHeader("X-TT-ENV", "boe_supply_center"); - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); - GlobalConfig.getGlobalConfig().addHttpRequestHeader("X-USE-PPE", "1"); - GlobalConfig.getGlobalConfig().addHttpRequestHeader("Origin-From", "djt_ppe_" + format.format(new Date())); - GlobalConfig.getGlobalConfig().addHttpRequestHeader("X-TT-ENV", "ppe_supply_center"); + if (!SystemTool.isProdEnv()) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + GlobalConfig.getGlobalConfig().addHttpRequestHeader("X-USE-PPE", "1"); + GlobalConfig.getGlobalConfig().addHttpRequestHeader("Origin-From", "djt_ppe_" + format.format(new Date())); + GlobalConfig.getGlobalConfig().addHttpRequestHeader("X-TT-ENV", "ppe_supply_center"); + } log.info("DdParam:{}", JSONObject.toJSONString(request.getParam())); log.info("DdRequest:{}", JSONObject.toJSONString(request));