From 18e4f0a99d95982791984acf45f23267bfa13e9c Mon Sep 17 00:00:00 2001 From: yuyang Date: Fri, 4 Mar 2022 13:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/payment/controller/AlipayPaymentController.java | 6 ++---- .../src/main/resources/mapper/XhpcCommonPaymentMapper.xml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/xhpc-modules/xhpc-payment/src/main/java/com/xhpc/payment/controller/AlipayPaymentController.java b/xhpc-modules/xhpc-payment/src/main/java/com/xhpc/payment/controller/AlipayPaymentController.java index 6f9eda2f..ea7b504d 100644 --- a/xhpc-modules/xhpc-payment/src/main/java/com/xhpc/payment/controller/AlipayPaymentController.java +++ b/xhpc-modules/xhpc-payment/src/main/java/com/xhpc/payment/controller/AlipayPaymentController.java @@ -38,7 +38,6 @@ import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.env.Environment; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -59,8 +58,6 @@ import java.util.Set; @Api(value = "支付宝支付接口", tags = "支付宝支付接口") public class AlipayPaymentController { - @Autowired - private Environment environment; @Autowired private IXhpcRechargeOrderService iXhpcRechargeOrderService; @Autowired @@ -188,7 +185,8 @@ public class AlipayPaymentController { if(xhpcRechargeOrder!=null){ XhpcSettingConfig xhpcSettingConfig = xhpcCommonPayment.getXhpcSettingConfigTenantId(UserTypeUtil.OPERATION_ALI_PAY_TYPE, xhpcRechargeOrder.getTenantId()); if(xhpcSettingConfig !=null){ - String publiccertpath = getAlipayPublicKey(environment.getProperty("PUBLICCERTPATH")); + //String publiccertpath = getAlipayPublicKey(environment.getProperty("PUBLICCERTPATH")); + String publiccertpath = getAlipayPublicKey(xhpcSettingConfig.getZfbAlipayCertPublicKeyRsa()); logger.info("<<<<<<<<<<<<支付宝公钥证书>>>>>>>>>"+publiccertpath); // 调用SDK验证签名 boolean signVerified = AlipaySignature.rsaCheckV1(params, publiccertpath, "utf-8", "RSA2"); diff --git a/xhpc-modules/xhpc-payment/src/main/resources/mapper/XhpcCommonPaymentMapper.xml b/xhpc-modules/xhpc-payment/src/main/resources/mapper/XhpcCommonPaymentMapper.xml index dd58b32c..1bb05b2b 100644 --- a/xhpc-modules/xhpc-payment/src/main/resources/mapper/XhpcCommonPaymentMapper.xml +++ b/xhpc-modules/xhpc-payment/src/main/resources/mapper/XhpcCommonPaymentMapper.xml @@ -21,7 +21,7 @@ - +