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