From 1b316baac69c75f08ce597882fdb758126762197 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Fri, 28 Jun 2024 09:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E7=94=A8appid=E8=BF=9B=E8=A1=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kit/plugin/wechat/WechatPlugin.java | 8 ++++---- .../dto/payment/WechatPaymentSetting.java | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java index 94ce4589..a7c2dd46 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java @@ -140,7 +140,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); - String appid = setting.getServiceAppId(); + String appid = setting.getH5AppId(); if (appid == null) { throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING); } @@ -199,7 +199,7 @@ public class WechatPlugin implements Payment { String attach = URLEncoder.createDefault().encode(JSONUtil.toJsonStr(payParam), StandardCharsets.UTF_8); WechatPaymentSetting setting = wechatPaymentSetting(); - String appid = setting.getServiceAppId(); + String appid = setting.getJsapiAppId(); if (appid == null) { throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING); } @@ -264,7 +264,7 @@ public class WechatPlugin implements Payment { String attach = URLEncoder.createDefault().encode(JSONUtil.toJsonStr(payParam), StandardCharsets.UTF_8); WechatPaymentSetting setting = wechatPaymentSetting(); - String appid = setting.getAppId(); + String appid = setting.getJsapiAppId(); if (appid == null) { throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING); } @@ -332,7 +332,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); - String appid = setting.getServiceAppId(); + String appid = setting.getNativeAppId(); if (appid == null) { throw new ServiceException(ResultCode.WECHAT_PAYMENT_NOT_SETTING); } diff --git a/framework/src/main/java/cn/lili/modules/system/entity/dto/payment/WechatPaymentSetting.java b/framework/src/main/java/cn/lili/modules/system/entity/dto/payment/WechatPaymentSetting.java index 4a027dc2..9cda1f97 100644 --- a/framework/src/main/java/cn/lili/modules/system/entity/dto/payment/WechatPaymentSetting.java +++ b/framework/src/main/java/cn/lili/modules/system/entity/dto/payment/WechatPaymentSetting.java @@ -14,17 +14,25 @@ import lombok.experimental.Accessors; public class WechatPaymentSetting { /** - * APP应用id + * JSAPI支付应用ID */ - private String appId; + private String jsapiAppId; /** - * 小程序应用id + * native支付应用ID + */ + private String nativeAppId; + /** + * 小程序支付应用id */ private String mpAppId; /** - * 服务号应用id + * H5支付应用ID */ - private String serviceAppId; + private String h5AppId; + /** + * APP支付应用ID + */ + private String appAppId; /** * 商户号 */