From 0e0d21f4b294c435278d2f3d5d91168e9ffab69a Mon Sep 17 00:00:00 2001 From: Lemon Date: Wed, 5 Jun 2024 10:06:16 +0800 Subject: [PATCH] update --- .../thirdparty/common/CommonService.java | 17 ++++++++++++++++- .../impl/DianXingPlatformServiceImpl.java | 2 +- .../impl/NinaXiaPlatformServiceImpl.java | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java index 0635cd483..9f2e8cca5 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java @@ -32,6 +32,7 @@ import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO; import com.jsowell.pile.vo.huawei.QueryStartChargeVO; import com.jsowell.pile.vo.web.PileStationVO; import com.jsowell.thirdparty.huawei.HuaweiServiceV2; +import com.jsowell.thirdparty.platform.service.impl.DianXingPlatformServiceImpl; import com.jsowell.thirdparty.platform.service.impl.HaiNanPlatformServiceImpl; import com.jsowell.thirdparty.huawei.HuaWeiService; import com.jsowell.thirdparty.lianlian.service.LianLianService; @@ -49,10 +50,14 @@ import com.jsowell.thirdparty.zhongdianlian.service.ZDLService; import lombok.extern.slf4j.Slf4j; import lombok.val; import org.apache.commons.collections4.CollectionUtils; +import org.bouncycastle.crypto.CryptoException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.UnsupportedEncodingException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.spec.InvalidKeySpecException; import java.text.ParseException; import java.util.List; import java.util.Map; @@ -120,6 +125,9 @@ public class CommonService { @Autowired private NinaXiaPlatformServiceImpl ninaXiaPlatformService; + @Autowired + private DianXingPlatformServiceImpl dianXingPlatformService; + @Autowired private RedisCache redisCache; @@ -438,7 +446,7 @@ public class CommonService { * 统一方法推送订单信息 * @param orderBasicInfo 订单信息 */ - public void commonPushOrderInfo(OrderBasicInfo orderBasicInfo) { + public void commonPushOrderInfo(OrderBasicInfo orderBasicInfo) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException, CryptoException { // 查询该站点是否推送第三方平台 // ThirdPartyStationRelation relation = new ThirdPartyStationRelation(); // relation.setStationId(Long.parseLong(orderBasicInfo.getStationId())); @@ -505,6 +513,13 @@ public class CommonService { // 青海平台 qingHaiPlatformService.notificationChargeOrderInfo(orderBasicInfo.getOrderCode()); } + if (StringUtils.equals(ThirdPlatformTypeEnum.NING_XIA_PLATFORM.getTypeCode(), thirdPartyType)) { + // 宁夏平台 + ninaXiaPlatformService.notificationChargeOrderInfo(orderBasicInfo.getOrderCode()); + } + if (StringUtils.equals(ThirdPlatformTypeEnum.DIAN_XING_PLATFORM.getTypeCode(), thirdPartyType)) { + dianXingPlatformService.notificationChargeOrderInfo(orderBasicInfo.getOrderCode()); + } } } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/DianXingPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/DianXingPlatformServiceImpl.java index 4b0f2ed81..9278f2093 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/DianXingPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/DianXingPlatformServiceImpl.java @@ -75,7 +75,7 @@ public class DianXingPlatformServiceImpl implements ThirdPartyPlatformService { } // 加密参数(方法中已将 sign 放入参数中并返回) String recordInfoStr = Sm2Util.generateEncryptedRequestInfo(jsonObject, thirdPartySecretInfoVO.getTheirPublicSecret(), thirdPartySecretInfoVO.getOurPrivateSecret()); - String tpToken = "4121d1c9121a41d894ed5082d264db30"; + String tpToken = "e17fe5c7b0f7404c9ea31091fbb5806f"; // 发送请求 String url = thirdPartySecretInfoVO.getTheirUrlPrefix(); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/NinaXiaPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/NinaXiaPlatformServiceImpl.java index 799a1de53..92a5b4095 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/NinaXiaPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/NinaXiaPlatformServiceImpl.java @@ -463,7 +463,7 @@ public class NinaXiaPlatformServiceImpl implements ThirdPartyPlatformService { } // 推送地址 - String url = urlAddress + "notification_orderInfo"; + String url = urlAddress + "supervise_notification_charge_order_info"; // 拼装成内蒙古平台所需格式对象 ChargeOrderInfo orderInfo = transformChargeOrderInfo(orderBasicInfo, orderDetail);