From 694f150a616a452af86163477562b1e6a4f8e075 Mon Sep 17 00:00:00 2001 From: DaxPay Date: Tue, 4 Jun 2024 19:03:24 +0800 Subject: [PATCH] =?UTF-8?q?test=20=E5=88=86=E8=B4=A6=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E6=96=B9SDK=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../allocation/QueryAllocReceiverParam.java | 2 ++ .../sdk/allocation/AllocationReceiverTest.java | 17 ++++++----------- .../daxpay/single/param/PaymentCommonParam.java | 1 - 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/daxpay-single-sdk/src/main/java/cn/daxpay/single/sdk/param/allocation/QueryAllocReceiverParam.java b/daxpay-single-sdk/src/main/java/cn/daxpay/single/sdk/param/allocation/QueryAllocReceiverParam.java index 3a8a20189..c4356188c 100644 --- a/daxpay-single-sdk/src/main/java/cn/daxpay/single/sdk/param/allocation/QueryAllocReceiverParam.java +++ b/daxpay-single-sdk/src/main/java/cn/daxpay/single/sdk/param/allocation/QueryAllocReceiverParam.java @@ -29,6 +29,8 @@ public class QueryAllocReceiverParam extends DaxPayRequest /** 分账接收方编号 */ private String receiverNo; + + @Override public String path() { return "/unipay/query/allocationReceiver"; diff --git a/daxpay-single-sdk/src/test/java/cn/daxpay/single/sdk/allocation/AllocationReceiverTest.java b/daxpay-single-sdk/src/test/java/cn/daxpay/single/sdk/allocation/AllocationReceiverTest.java index aeceba624..daadf535f 100644 --- a/daxpay-single-sdk/src/test/java/cn/daxpay/single/sdk/allocation/AllocationReceiverTest.java +++ b/daxpay-single-sdk/src/test/java/cn/daxpay/single/sdk/allocation/AllocationReceiverTest.java @@ -1,6 +1,7 @@ package cn.daxpay.single.sdk.allocation; import cn.daxpay.single.sdk.code.AllocReceiverTypeEnum; +import cn.daxpay.single.sdk.code.AllocRelationTypeEnum; import cn.daxpay.single.sdk.code.PayChannelEnum; import cn.daxpay.single.sdk.code.SignTypeEnum; import cn.daxpay.single.sdk.model.allocation.AllocReceiverAddModel; @@ -42,15 +43,12 @@ public void add() { AllocReceiverAddParam param = new AllocReceiverAddParam(); param.setChannel(PayChannelEnum.ALI.getCode()); param.setClientIp("127.0.0.1"); - param.setReceiverName("测试"); - param.setRelationType("user"); - param.setRelationName("测试"); + param.setRelationType(AllocRelationTypeEnum.HEADQUARTER.getCode()); param.setReceiverNo("123456"); - param.setReceiverType(AllocReceiverTypeEnum.ALI_OPEN_ID.getCode()); - param.setReceiverAccount("123456"); + param.setReceiverType(AllocReceiverTypeEnum.ALI_USER_ID.getCode()); + param.setReceiverAccount("20881233343"); DaxPayResult execute = DaxPayKit.execute(param); System.out.println(JSONUtil.toJsonStr(execute)); - } /** @@ -60,10 +58,9 @@ public void add() { public void remove() { AllocReceiverRemoveParam param = new AllocReceiverRemoveParam(); param.setClientIp("127.0.0.1"); - param.setReceiverNo("123"); + param.setReceiverNo("123456"); DaxPayResult execute = DaxPayKit.execute(param); System.out.println(JSONUtil.toJsonStr(execute)); - } /** @@ -73,12 +70,10 @@ public void remove() { public void query() { QueryAllocReceiverParam param = new QueryAllocReceiverParam(); param.setChannel(PayChannelEnum.ALI.getCode()); + param.setReceiverNo("1231"); param.setClientIp("127.0.0.1"); DaxPayResult execute = DaxPayKit.execute(param); - System.out.println(JSONUtil.toJsonStr(execute)); - } - } diff --git a/daxpay-single/daxpay-single-core/src/main/java/cn/daxpay/single/param/PaymentCommonParam.java b/daxpay-single/daxpay-single-core/src/main/java/cn/daxpay/single/param/PaymentCommonParam.java index db4a3afac..5ca4fb02a 100644 --- a/daxpay-single/daxpay-single-core/src/main/java/cn/daxpay/single/param/PaymentCommonParam.java +++ b/daxpay-single/daxpay-single-core/src/main/java/cn/daxpay/single/param/PaymentCommonParam.java @@ -18,7 +18,6 @@ public abstract class PaymentCommonParam { /** 客户端ip */ -// @NotBlank(message = "客户端ip不可为空") @Schema(description = "客户端ip") private String clientIp;