From 7bf197ccf568c0e0162c1e57f25c627248aace51 Mon Sep 17 00:00:00 2001 From: 353259576 <1048058229@qq.com> Date: Thu, 15 Aug 2024 08:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=B4=BB=E6=9C=8D=E5=8A=A1=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E7=B3=BB=E7=BB=9F->=E5=88=86=E8=B4=A6->=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=88=86=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/dyj/applet/DyAppletClient.java | 10 ++ .../client/IndustryTransactionClient.java | 13 +- .../query/IndustryQuerySettleQuery.java | 119 ++++++++++++++ .../domain/vo/IndustryQuerySettleVo.java | 151 ++++++++++++++++++ .../handler/IndustryTransactionHandler.java | 13 ++ .../dyj/common/enums/DyAppletUrlPathEnum.java | 6 + .../dyj/examples/applet/TransactionTest.java | 14 ++ 7 files changed, 325 insertions(+), 1 deletion(-) create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/query/IndustryQuerySettleQuery.java create mode 100644 dy-java-applet/src/main/java/com/dyj/applet/domain/vo/IndustryQuerySettleVo.java diff --git a/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java b/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java index 3845d49..045260e 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/DyAppletClient.java @@ -2119,6 +2119,7 @@ public class DyAppletClient extends BaseClient { /** * 生活服务交易系统->核销->抖音码->撤销核销 + * 生活服务交易系统->核销->三方码->撤销核销 * @param body 撤销核销请求值 * @return */ @@ -2137,6 +2138,15 @@ public class DyAppletClient extends BaseClient { return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).pushDelivery(body); } + /** + * 生活服务交易系统->分账->查询分账 + * @param body 查询分账请求值 + * @return + */ + public DataAndExtraVo> industryQuerySettle(IndustryQuerySettleQuery body){ + return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).industryQuerySettle(body); + } + /** * 获取抖音号绑定所需的资质模版列表 * diff --git a/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java b/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java index 5a49706..2146843 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/client/IndustryTransactionClient.java @@ -13,6 +13,8 @@ import com.dyj.common.interceptor.ClientQueryTokenInterceptor; import com.dyj.common.interceptor.ClientTokenInterceptor; import com.dyj.common.interceptor.TokenHeaderInterceptor; +import java.util.List; + /** * 交易系统 生活服务交易系统 */ @@ -77,7 +79,8 @@ public interface IndustryTransactionClient { DataAndExtraVo deliveryVerify(@JSONBody DeliveryVerifyQuery body); /** - * 生活服务交易系统->核销->抖音码->撤销核销 + * 生活服务交易系统->核销->抖音码-> + * 生活服务交易系统->核销->三方码->撤销核销 * @param body 撤销核销请求值 * @return */ @@ -91,4 +94,12 @@ public interface IndustryTransactionClient { */ @Post(value = "${pushDelivery}", interceptor = ClientTokenInterceptor.class) DataAndExtraVo pushDelivery(@JSONBody PushDeliveryQuery body); + + /** + * 生活服务交易系统->分账->查询分账 + * @param body 查询分账请求值 + * @return + */ + @Post(value = "${industryQuerySettle}", interceptor = ClientTokenInterceptor.class) + DataAndExtraVo> industryQuerySettle(@JSONBody IndustryQuerySettleQuery body); } diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/query/IndustryQuerySettleQuery.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/query/IndustryQuerySettleQuery.java new file mode 100644 index 0000000..9f9a578 --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/query/IndustryQuerySettleQuery.java @@ -0,0 +1,119 @@ +package com.dyj.applet.domain.query; + +import com.dyj.common.domain.query.BaseQuery; + +/** + * 查询分账请求值 + */ +public class IndustryQuerySettleQuery extends BaseQuery { + + /** + * 抖音开平侧订单 id,长度 <= 64字节 选填 + */ + private String order_id; + /** + * 开发者侧订单 id,长度 <= 64 字节 选填 + */ + private String out_order_no; + /** + * 开发者侧分账单 id,长度 <= 64字节 选填 + */ + private String out_settle_no; + /** + * 抖音开平侧分账单 id,长度 <= 64字节 选填 + */ + private String settle_id; + + public String getOrder_id() { + return order_id; + } + + public IndustryQuerySettleQuery setOrder_id(String order_id) { + this.order_id = order_id; + return this; + } + + public String getOut_order_no() { + return out_order_no; + } + + public IndustryQuerySettleQuery setOut_order_no(String out_order_no) { + this.out_order_no = out_order_no; + return this; + } + + public String getOut_settle_no() { + return out_settle_no; + } + + public IndustryQuerySettleQuery setOut_settle_no(String out_settle_no) { + this.out_settle_no = out_settle_no; + return this; + } + + public String getSettle_id() { + return settle_id; + } + + public IndustryQuerySettleQuery setSettle_id(String settle_id) { + this.settle_id = settle_id; + return this; + } + + public static IndustryQuerySettleQueryBuilder builder() { + return new IndustryQuerySettleQueryBuilder(); + } + + public static final class IndustryQuerySettleQueryBuilder { + private String order_id; + private String out_order_no; + private String out_settle_no; + private String settle_id; + private Integer tenantId; + private String clientKey; + + private IndustryQuerySettleQueryBuilder() { + } + + public IndustryQuerySettleQueryBuilder orderId(String orderId) { + this.order_id = orderId; + return this; + } + + public IndustryQuerySettleQueryBuilder outOrderNo(String outOrderNo) { + this.out_order_no = outOrderNo; + return this; + } + + public IndustryQuerySettleQueryBuilder outSettleNo(String outSettleNo) { + this.out_settle_no = outSettleNo; + return this; + } + + public IndustryQuerySettleQueryBuilder settleId(String settleId) { + this.settle_id = settleId; + return this; + } + + public IndustryQuerySettleQueryBuilder tenantId(Integer tenantId) { + this.tenantId = tenantId; + return this; + } + + public IndustryQuerySettleQueryBuilder clientKey(String clientKey) { + this.clientKey = clientKey; + return this; + } + + public IndustryQuerySettleQuery build() { + IndustryQuerySettleQuery industryQuerySettleQuery = new IndustryQuerySettleQuery(); + industryQuerySettleQuery.setOrder_id(order_id); + industryQuerySettleQuery.setOut_order_no(out_order_no); + industryQuerySettleQuery.setOut_settle_no(out_settle_no); + industryQuerySettleQuery.setSettle_id(settle_id); + industryQuerySettleQuery.setTenantId(tenantId); + industryQuerySettleQuery.setClientKey(clientKey); + return industryQuerySettleQuery; + } + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/IndustryQuerySettleVo.java b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/IndustryQuerySettleVo.java new file mode 100644 index 0000000..507e70d --- /dev/null +++ b/dy-java-applet/src/main/java/com/dyj/applet/domain/vo/IndustryQuerySettleVo.java @@ -0,0 +1,151 @@ +package com.dyj.applet.domain.vo; + +/** + * 查询分账返回值 + */ +public class IndustryQuerySettleVo { + + /** + * 佣金,单位分 + */ + private Long commission; + /** + * 开发者自定义透传字段,长度 <= 2048 字节,不支持二进制数据 + */ + private String cp_extra; + /** + * 抖音开平侧交易订单 id,长度 <= 64 字节,由数字、ASCII 字符组成 + */ + private String order_id; + /** + * 开发者侧交易订单 id,长度 <= 64 字节,由数字、ASCII 字符组成 + */ + private String out_order_no; + /** + * 开发者侧分账单 id,长度 <= 64字节,由数字、ASCII 字符组成 + */ + private String out_settle_no; + /** + * 手续费,单位分 + */ + private Long rake; + /** + * 分账金额,单位分 + */ + private Long settle_amount; + /** + * 分账详情 + */ + private String settle_detail; + /** + * 抖音开平侧分账单id,长度 <= 64 字节,由数字、ASCII 字符组成 + */ + private String settle_id; + /** + * 分账状态: + */ + private String settle_status; + /** + * 分账时间,13 位时间戳,单位毫秒 + */ + private Long settle_time; + + public Long getCommission() { + return commission; + } + + public IndustryQuerySettleVo setCommission(Long commission) { + this.commission = commission; + return this; + } + + public String getCp_extra() { + return cp_extra; + } + + public IndustryQuerySettleVo setCp_extra(String cp_extra) { + this.cp_extra = cp_extra; + return this; + } + + public String getOrder_id() { + return order_id; + } + + public IndustryQuerySettleVo setOrder_id(String order_id) { + this.order_id = order_id; + return this; + } + + public String getOut_order_no() { + return out_order_no; + } + + public IndustryQuerySettleVo setOut_order_no(String out_order_no) { + this.out_order_no = out_order_no; + return this; + } + + public String getOut_settle_no() { + return out_settle_no; + } + + public IndustryQuerySettleVo setOut_settle_no(String out_settle_no) { + this.out_settle_no = out_settle_no; + return this; + } + + public Long getRake() { + return rake; + } + + public IndustryQuerySettleVo setRake(Long rake) { + this.rake = rake; + return this; + } + + public Long getSettle_amount() { + return settle_amount; + } + + public IndustryQuerySettleVo setSettle_amount(Long settle_amount) { + this.settle_amount = settle_amount; + return this; + } + + public String getSettle_detail() { + return settle_detail; + } + + public IndustryQuerySettleVo setSettle_detail(String settle_detail) { + this.settle_detail = settle_detail; + return this; + } + + public String getSettle_id() { + return settle_id; + } + + public IndustryQuerySettleVo setSettle_id(String settle_id) { + this.settle_id = settle_id; + return this; + } + + public String getSettle_status() { + return settle_status; + } + + public IndustryQuerySettleVo setSettle_status(String settle_status) { + this.settle_status = settle_status; + return this; + } + + public Long getSettle_time() { + return settle_time; + } + + public IndustryQuerySettleVo setSettle_time(Long settle_time) { + this.settle_time = settle_time; + return this; + } +} diff --git a/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java b/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java index eba5dd2..75ef1ce 100644 --- a/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java +++ b/dy-java-applet/src/main/java/com/dyj/applet/handler/IndustryTransactionHandler.java @@ -11,6 +11,8 @@ import com.dyj.common.domain.DySimpleResult; import com.dyj.common.domain.vo.BaseVo; import com.dyj.common.interceptor.ClientTokenInterceptor; +import java.util.List; + /** * 交易系统 生活服务交易系统 */ @@ -92,6 +94,7 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{ /** * 生活服务交易系统->核销->抖音码->撤销核销 + * 生活服务交易系统->核销->三方码->撤销核销 * @param body 撤销核销请求值 * @return */ @@ -109,4 +112,14 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{ baseQuery(body); return getIndustryOpenTransactionClient().pushDelivery(body); } + + /** + * 生活服务交易系统->分账->查询分账 + * @param body 查询分账请求值 + * @return + */ + public DataAndExtraVo> industryQuerySettle(IndustryQuerySettleQuery body){ + baseQuery(body); + return getIndustryOpenTransactionClient().industryQuerySettle(body); + } } diff --git a/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java b/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java index ebc53e3..824e7fd 100644 --- a/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java +++ b/dy-java-common/src/main/java/com/dyj/common/enums/DyAppletUrlPathEnum.java @@ -504,6 +504,7 @@ public enum DyAppletUrlPathEnum { /** * 生活服务交易系统->核销->抖音码->撤销核销 + * 生活服务交易系统->核销->三方码->撤销核销 */ VERIFY_CANCEL("verifyCancel", "/api/trade/v2/fulfillment/verify_cancel"), @@ -511,6 +512,11 @@ public enum DyAppletUrlPathEnum { * 生活服务交易系统->核销->三方码->推送核销状态 */ PUSH_DELIVERY("pushDelivery", "/api/apps/trade/v2/fulfillment/push_delivery"), + + /** + * 生活服务交易系统->分账->查询分账 + */ + INDUSTRY_QUERY_SETTLE("industryQuerySettle", "/api/apps/trade/v2/settle/query_settle") ; diff --git a/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java b/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java index d3bc12f..f7a1368 100644 --- a/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java +++ b/dy-java-examples/dy-java-examples-springboot/src/test/java/com/dyj/examples/applet/TransactionTest.java @@ -443,6 +443,7 @@ public class TransactionTest { /** * 生活服务交易系统->核销->抖音码->撤销核销 + * 生活服务交易系统->核销->三方码->撤销核销 */ @Test public void verifyCancel(){ @@ -467,4 +468,17 @@ public class TransactionTest { ); } + /** + * 生活服务交易系统->分账->查询分账 + */ + @Test + public void industryQuerySettle(){ + DyAppletClient dyAppletClient = new DyAppletClient(); + System.out.println( + JSON.toJSONString( + dyAppletClient.industryQuerySettle(IndustryQuerySettleQuery.builder().build()) + ) + ); + } + }