From fa68a440d3b9159833850263dc94af3fbbda2693 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Thu, 21 Nov 2024 19:58:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9E=9A=E4=B8=BE=E7=B1=BB=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/weixin/AbstractWxPayClient.java | 28 +++++++++---------- .../impl/weixin/WxPayClientConfig.java | 2 +- .../skyeye/pay/enums/PayChannelVersion.java | 4 +-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/core/service/impl/weixin/AbstractWxPayClient.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/core/service/impl/weixin/AbstractWxPayClient.java index 7f46a8f3..fd56abf2 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/core/service/impl/weixin/AbstractWxPayClient.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/core/service/impl/weixin/AbstractWxPayClient.java @@ -68,9 +68,9 @@ public abstract class AbstractWxPayClient extends AbstractPayClient params, String body) throws WxPayException { - if (Objects.equals(config.getApiVersion(), PayChannelVersion.V2.getKey())) { + if (Objects.equals(config.getApiVersion(), PayChannelVersion.V2_VERSION.getKey())) { return doParseOrderNotifyV2(body); - } else if (Objects.equals(config.getApiVersion(), PayChannelVersion.V3.getKey())) { + } else if (Objects.equals(config.getApiVersion(), PayChannelVersion.V3_VERSION.getKey())) { return doParseOrderNotifyV3(body); } else { throw new IllegalArgumentException(String.format("未知的 API 版本(%s)", config.getApiVersion())); @@ -188,9 +188,9 @@ public abstract class AbstractWxPayClient extends AbstractPayClient params, String body) throws WxPayException { - if (Objects.equals(config.getApiVersion(), PayChannelVersion.V2.getKey())) { + if (Objects.equals(config.getApiVersion(), PayChannelVersion.V2_VERSION.getKey())) { return doParseRefundNotifyV2(body); - } else if (Objects.equals(config.getApiVersion(), PayChannelVersion.V3.getKey())) { + } else if (Objects.equals(config.getApiVersion(), PayChannelVersion.V3_VERSION.getKey())) { return parseRefundNotifyV3(body); } else { throw new IllegalArgumentException(String.format("未知的 API 版本(%s)", config.getApiVersion())); @@ -351,9 +351,9 @@ public abstract class AbstractWxPayClient extends AbstractPayClient> constraintViolations = validator.validate(this, PayChannelVersion.V2.getKey().equals(this.getApiVersion()) ? V2.class : V3.class); + Set> constraintViolations = validator.validate(this, PayChannelVersion.V2_VERSION.getKey().equals(this.getApiVersion()) ? V2.class : V3.class); if (CollUtil.isNotEmpty(constraintViolations)) { throw new ConstraintViolationException(constraintViolations); } diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayChannelVersion.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayChannelVersion.java index e3b74624..50142b4b 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayChannelVersion.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/pay/enums/PayChannelVersion.java @@ -23,9 +23,9 @@ import lombok.NoArgsConstructor; public enum PayChannelVersion implements SkyeyeEnumClass { // V2 协议说明 - V2_PROTOCOL("V2", "V2 协议", true, false), + V2_VERSION("V2", "V2 协议", true, false), // V3 协议说明 - V3_PROTOCOL("V3", "V3 协议", true, true); + V3_VERSION("V3", "V3 协议", true, true); private String key;