From 6cce17cb2eee1c1aecfebd07a90c4b0189159798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=85=B4=E6=98=8E1?= <616868374@qq.com> Date: Mon, 3 Jul 2023 08:14:23 +0000 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=95=86=E6=94=AF=E4=BB=98=E5=88=86=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxpay/bean/payscore/WxPartnerPayScoreRequest.java | 6 ++++++ .../wxpay/service/impl/PartnerPayScoreServiceImpl.java | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/payscore/WxPartnerPayScoreRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/payscore/WxPartnerPayScoreRequest.java index e48080728..f2c977e37 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/payscore/WxPartnerPayScoreRequest.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/payscore/WxPartnerPayScoreRequest.java @@ -35,6 +35,12 @@ public class WxPartnerPayScoreRequest extends WxPayScoreRequest { @SerializedName("sub_mchid") private String subMchid; + /** + * 子商户公众号下的用户表示sub_openid + */ + @SerializedName("sub_openid") + private String subOpenid; + /** * [收付通子商户申请绑定支付分服务]的商户系统内部服务订单号 */ diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerPayScoreServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerPayScoreServiceImpl.java index 0e3746844..55c913e79 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerPayScoreServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/PartnerPayScoreServiceImpl.java @@ -105,7 +105,7 @@ public class PartnerPayScoreServiceImpl implements PartnerPayScoreService { if (StringUtils.isBlank(subMchid)) { throw new WxPayException("sub_mchid不允许都为空"); } - String url = String.format("%s/v3/payscore/partner/permissions/openid/%s", this.payService.getPayBaseUrl(), openId); + String url = String.format("%s/v3/payscore/partner/permissions/search?", this.payService.getPayBaseUrl(), openId); URIBuilder uriBuilder; try { uriBuilder = new URIBuilder(url); @@ -140,7 +140,7 @@ public class PartnerPayScoreServiceImpl implements PartnerPayScoreService { if (StringUtils.isAllEmpty(openId, subOpenid) || !StringUtils.isAnyEmpty(openId, subOpenid)) { throw new WxPayException("open_id,sub_openid不允许都填写或都不填写"); } - String url = String.format("%s/v3/payscore/partner/permissions/openid/%s/terminate", this.payService.getPayBaseUrl(), openId); + String url = String.format("%s/v3/payscore/partner/permissions/terminate", this.payService.getPayBaseUrl(), openId); Map map = new HashMap<>(4); map.put("appid", appId); map.put("sub_appid", subAppid);