🎨 修复接口参数命名错误问题

This commit is contained in:
Binary Wang 2021-09-19 12:59:03 +08:00
parent cabee0f70c
commit 2019efffa3
4 changed files with 14 additions and 16 deletions

View File

@ -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;
}

View File

@ -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>

View File

@ -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);
}

View File

@ -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));
}