mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 修复接口参数命名错误问题
This commit is contained in:
parent
cabee0f70c
commit
2019efffa3
@ -19,16 +19,14 @@ public class WxPayRefundQueryV3Request implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* <pre>
|
||||
* 字段名:商户订单号
|
||||
* 变量名:out_trade_no
|
||||
* 字段名:商户退款单号
|
||||
* 变量名:out_refund_no
|
||||
* 是否必填:是
|
||||
* 类型:string[1,32]
|
||||
* 描述:
|
||||
* 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。
|
||||
* 特殊规则:最小字符长度为6
|
||||
* 示例值:1217752501201407033233368018
|
||||
* 类型:string[1, 64]
|
||||
* 描述:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。
|
||||
* 示例值:1217752501201407033233368018
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName(value = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
@SerializedName(value = "out_refund_no")
|
||||
private String outRefundNo;
|
||||
}
|
||||
|
@ -697,11 +697,11 @@ public interface WxPayService {
|
||||
* 接口链接:https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/{out_refund_no}
|
||||
* </pre>
|
||||
*
|
||||
* @param outTradeNo 商户订单号
|
||||
* @param outRefundNo 商户退款单号
|
||||
* @return 退款信息 wx pay refund query result
|
||||
* @throws WxPayException the wx pay exception
|
||||
*/
|
||||
WxPayRefundQueryV3Result refundQueryV3(String outTradeNo) throws WxPayException;
|
||||
WxPayRefundQueryV3Result refundQueryV3(String outRefundNo) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
@ -305,15 +305,15 @@ public abstract class BaseWxPayServiceImpl implements WxPayService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxPayRefundQueryV3Result refundQueryV3(String outTradeNo) throws WxPayException {
|
||||
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), outTradeNo);
|
||||
public WxPayRefundQueryV3Result refundQueryV3(String outRefundNo) throws WxPayException {
|
||||
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), outRefundNo);
|
||||
String response = this.getV3(url);
|
||||
return GSON.fromJson(response, WxPayRefundQueryV3Result.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxPayRefundQueryV3Result refundQueryV3(WxPayRefundQueryV3Request request) throws WxPayException {
|
||||
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), request.getOutTradeNo());
|
||||
String url = String.format("%s/v3/refund/domestic/refunds/%s", this.getPayBaseUrl(), request.getOutRefundNo());
|
||||
String response = this.getV3(url);
|
||||
return GSON.fromJson(response, WxPayRefundQueryV3Result.class);
|
||||
}
|
||||
|
@ -769,8 +769,8 @@ public class BaseWxPayServiceImplTest {
|
||||
@Test
|
||||
public void testRefundQueryV3() throws WxPayException {
|
||||
WxPayRefundQueryV3Request request = new WxPayRefundQueryV3Request();
|
||||
// request.setOutTradeNo("n1ZvYqjAg3D7LUBa");
|
||||
request.setOutTradeNo("123456789011");
|
||||
// request.setOutRefundNo("n1ZvYqjAg3D7LUBa");
|
||||
request.setOutRefundNo("123456789011");
|
||||
WxPayRefundQueryV3Result result = this.payService.refundQueryV3(request);
|
||||
System.out.println(GSON.toJson(result));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user