行业交易系统->退货退款->查询退款

This commit is contained in:
353259576 2024-11-08 15:00:00 +08:00
parent 168c351ed9
commit dc27a0f18d
8 changed files with 262 additions and 0 deletions

View File

@ -2384,6 +2384,15 @@ public class DyAppletClient extends BaseClient {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).merchantAuditCallbackV2(body);
}
/**
* 行业交易系统->退货退款->查询退款
* @param body 查询退款
* @return
*/
public DySimpleResult<TradeQueryRefundVo> tradeQueryRefund(QueryRefundQuery body) {
return new IndustryTransactionHandler(configuration().getAgentByTenantId(tenantId, clientKey)).tradeQueryRefund(body);
}
/**
* 获取抖音号绑定所需的资质模版列表
*

View File

@ -307,4 +307,14 @@ public interface IndustryTransactionClient {
*/
@Post(value = "${merchantAuditCallbackV2}", interceptor = ClientTokenInterceptor.class)
DySimpleResult<Void> merchantAuditCallbackV2(@JSONBody MerchantAuditCallbackQuery body);
/**
* 行业交易系统->退货退款->查询退款
* @param body 查询退款
* @return
*/
@Post(value = "${tradeQueryRefund}", interceptor = ClientTokenInterceptor.class)
DySimpleResult<TradeQueryRefundVo> tradeQueryRefund(@JSONBody QueryRefundQuery body);
}

View File

@ -0,0 +1,44 @@
package com.dyj.applet.domain;
public class MerchantAuditDetail {
/**
* 不同意退款信息(不同意退款时必填)长度 <= 512 byte 选填
*/
private String deny_message;
/**
* <p>审核状态</p><ul><li>1-同意退款 </li><li>2-不同意退款</li></ul>
*/
private Integer refund_audit_status;
/**
* <p>交易系统侧退款单号长度 &lt;= 64 byte</p>
*/
private String refund_id;
public String getDeny_message() {
return deny_message;
}
public MerchantAuditDetail setDeny_message(String deny_message) {
this.deny_message = deny_message;
return this;
}
public Integer getRefund_audit_status() {
return refund_audit_status;
}
public MerchantAuditDetail setRefund_audit_status(Integer refund_audit_status) {
this.refund_audit_status = refund_audit_status;
return this;
}
public String getRefund_id() {
return refund_id;
}
public MerchantAuditDetail setRefund_id(String refund_id) {
this.refund_id = refund_id;
return this;
}
}

View File

@ -0,0 +1,151 @@
package com.dyj.applet.domain;
import java.util.List;
public class TradeQueryRefundResult {
/**
* 退款创建时间13位毫秒时间戳
*/
private Long create_at;
/**
* 退款结果信息可以通过该字段了解退款失败原因 选填
*/
private String message;
/**
* 系统订单信息开放平台生成的订单号
*/
private String order_id;
/**
* 开发者系统生成的退款单号与抖音开平退款单号唯一关联 选填
*/
private String out_refund_no;
/**
* 退款时间13位毫秒时间戳只有已退款才有退款时间 选填
*/
private Long refund_at;
/**
* 系统退款单号开放平台生成的退款单号
*/
private String refund_id;
/**
* <p>退款来源老的担保交易/1.0订单可能没有记录来源</p><ul><li>1: 用户发起退款</li><li>2: 开放者发起退款</li><li>3: 过期自动退款</li><li>4: 抖音客服退款</li><li>5: 预约失败自动发起退款</li><li>6: 开发者拒绝接单退款</li><li>7: 后约单触发先买单退款</li></ul> 选填
*/
private Integer refund_source;
/**
* <ul><li>退款状态:退款中-PROCESSING</li><li>已退款-SUCCESS</li><li>退款失败-FAIL</li></ul>
*/
private String refund_status;
/**
* 退款金额单位[]
*/
private Long refund_total_amount;
/**
* 系统订单信息开放平台生成的订单号 选填
*/
private List<RefundItemOrderDetail> item_order_detail;
/**
* 退款审核信息 选填
*/
private MerchantAuditDetail merchant_audit_detail;
public Long getCreate_at() {
return create_at;
}
public TradeQueryRefundResult setCreate_at(Long create_at) {
this.create_at = create_at;
return this;
}
public String getMessage() {
return message;
}
public TradeQueryRefundResult setMessage(String message) {
this.message = message;
return this;
}
public String getOrder_id() {
return order_id;
}
public TradeQueryRefundResult setOrder_id(String order_id) {
this.order_id = order_id;
return this;
}
public String getOut_refund_no() {
return out_refund_no;
}
public TradeQueryRefundResult setOut_refund_no(String out_refund_no) {
this.out_refund_no = out_refund_no;
return this;
}
public Long getRefund_at() {
return refund_at;
}
public TradeQueryRefundResult setRefund_at(Long refund_at) {
this.refund_at = refund_at;
return this;
}
public String getRefund_id() {
return refund_id;
}
public TradeQueryRefundResult setRefund_id(String refund_id) {
this.refund_id = refund_id;
return this;
}
public Integer getRefund_source() {
return refund_source;
}
public TradeQueryRefundResult setRefund_source(Integer refund_source) {
this.refund_source = refund_source;
return this;
}
public String getRefund_status() {
return refund_status;
}
public TradeQueryRefundResult setRefund_status(String refund_status) {
this.refund_status = refund_status;
return this;
}
public Long getRefund_total_amount() {
return refund_total_amount;
}
public TradeQueryRefundResult setRefund_total_amount(Long refund_total_amount) {
this.refund_total_amount = refund_total_amount;
return this;
}
public List<RefundItemOrderDetail> getItem_order_detail() {
return item_order_detail;
}
public TradeQueryRefundResult setItem_order_detail(List<RefundItemOrderDetail> item_order_detail) {
this.item_order_detail = item_order_detail;
return this;
}
public MerchantAuditDetail getMerchant_audit_detail() {
return merchant_audit_detail;
}
public TradeQueryRefundResult setMerchant_audit_detail(MerchantAuditDetail merchant_audit_detail) {
this.merchant_audit_detail = merchant_audit_detail;
return this;
}
}

View File

@ -0,0 +1,19 @@
package com.dyj.applet.domain.vo;
import com.dyj.applet.domain.TradeQueryRefundResult;
import java.util.List;
public class TradeQueryRefundVo {
private List<TradeQueryRefundResult> refund_list;
public List<TradeQueryRefundResult> getRefund_list() {
return refund_list;
}
public TradeQueryRefundVo setRefund_list(List<TradeQueryRefundResult> refund_list) {
this.refund_list = refund_list;
return this;
}
}

View File

@ -386,4 +386,14 @@ public class IndustryTransactionHandler extends AbstractAppletHandler{
baseQuery(body);
return getIndustryOpenTransactionClient().merchantAuditCallbackV2(body);
}
/**
* 行业交易系统->退货退款->查询退款
* @param body 查询退款
* @return
*/
public DySimpleResult<TradeQueryRefundVo> tradeQueryRefund(QueryRefundQuery body) {
baseQuery(body);
return getIndustryOpenTransactionClient().tradeQueryRefund(body);
}
}

View File

@ -660,6 +660,12 @@ public enum DyAppletUrlPathEnum {
* 行业交易系统->退货退款->同步退款审核结果
*/
MERCHANT_AUDIT_CALLBACK_V2("merchantAuditCallbackV2", "/api/apps/trade/v2/merchant_audit_callback"),
/**
* https://developer.toutiao.com
* 行业交易系统->退货退款->查询退款
*/
TRADE_QUERY_REFUND("tradeQueryRefund", "/api/apps/trade/v2/query_refund"),
;

View File

@ -830,4 +830,17 @@ public class TransactionTest {
)
);
}
/**
* 行业交易系统->退货退款->查询退款
*/
@Test
public void tradeQueryRefund(){
DyAppletClient dyAppletClient = new DyAppletClient();
System.out.println(
JSON.toJSONString(
dyAppletClient.tradeQueryRefund(QueryRefundQuery.builder().build())
)
);
}
}