Skip to content

Commit d8250cb

Browse files
committed
binarywang#399 微信支付退款查询接口调整“代金券类型”字段位置
1 parent 3a55561 commit d8250cb

1 file changed

Lines changed: 18 additions & 34 deletions

File tree

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxPayRefundQueryResult.java‎

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ public void composeRefundRecords() {
141141
refundRecord.setRefundChannel(this.getXmlValue("xml/refund_channel_" + i));
142142
refundRecord.setRefundFee(this.getXmlValueAsInt("xml/refund_fee_" + i));
143143
refundRecord.setSettlementRefundFee(this.getXmlValueAsInt("xml/settlement_refund_fee_" + i));
144-
refundRecord.setCouponType(this.getXmlValue("xml/coupon_type_" + i));
145144
refundRecord.setCouponRefundFee(this.getXmlValueAsInt("xml/coupon_refund_fee_" + i));
146145
refundRecord.setCouponRefundCount(this.getXmlValueAsInt("xml/coupon_refund_count_" + i));
147146
refundRecord.setRefundStatus(this.getXmlValue("xml/refund_status_" + i));
@@ -157,7 +156,8 @@ public void composeRefundRecords() {
157156
coupons.add(
158157
new RefundRecord.RefundCoupon(
159158
this.getXmlValue("xml/coupon_refund_id_" + i + "_" + j),
160-
this.getXmlValueAsInt("xml/coupon_refund_fee_" + i + "_" + j)
159+
this.getXmlValueAsInt("xml/coupon_refund_fee_" + i + "_" + j),
160+
this.getXmlValue("xml/coupon_type_" + i + "_" + j)
161161
)
162162
);
163163
}
@@ -251,19 +251,6 @@ public static class RefundRecord {
251251
@XStreamAlias("refund_account")
252252
private String refundAccount;
253253

254-
/**
255-
* <pre>
256-
* 字段名:代金券类型.
257-
* 变量名:coupon_type_$n
258-
* 是否必填:否
259-
* 类型:Int
260-
* 示例值:CASH
261-
* 描述:CASH--充值代金券 , NO_CASH---非充值代金券。订单使用代金券时有返回(取值:CASH、NO_CASH)。$n为下标,从0开始编号,举例:coupon_type_$0
262-
* </pre>
263-
*/
264-
@XStreamAlias("coupon_type")
265-
private String couponType;
266-
267254
/**
268255
* <pre>
269256
* 字段名:代金券退款金额.
@@ -338,22 +325,8 @@ public static class RefundRecord {
338325

339326
@Data
340327
@NoArgsConstructor
328+
@AllArgsConstructor
341329
public static class RefundCoupon {
342-
/**
343-
* <pre>
344-
* 字段名:退款代金券批次ID.
345-
* 变量名:coupon_refund_batch_id_$n_$m
346-
* 是否必填:否
347-
* 类型:String(20)
348-
* 示例值:100
349-
* 描述:退款代金券批次ID ,$n为下标,$m为下标,从0开始编号
350-
* </pre>
351-
*
352-
* @deprecated 貌似是被去掉了,但不知是何时!
353-
*/
354-
@XStreamAlias("coupon_refund_batch_id")
355-
private String couponRefundBatchId;
356-
357330
/**
358331
* <pre>
359332
* 字段名:退款代金券ID.
@@ -380,10 +353,21 @@ public static class RefundCoupon {
380353
@XStreamAlias("coupon_refund_fee")
381354
private Integer couponRefundFee;
382355

383-
public RefundCoupon(String couponRefundId, Integer couponRefundFee) {
384-
this.couponRefundId = couponRefundId;
385-
this.couponRefundFee = couponRefundFee;
386-
}
356+
/**
357+
* <pre>
358+
* 字段名:代金券类型.
359+
* 变量名:coupon_type_$n_$m
360+
* 是否必填:否
361+
* 类型:String(8)
362+
* 示例值:CASH
363+
* 描述:CASH--充值代金券 , NO_CASH---非充值代金券。
364+
* 开通免充值券功能,并且订单使用了优惠券后有返回(取值:CASH、NO_CASH)。
365+
* $n为下标,$m为下标,从0开始编号,举例:coupon_type_$0_$1
366+
* </pre>
367+
*/
368+
@XStreamAlias("coupon_type")
369+
private String couponType;
370+
387371

388372
}
389373

0 commit comments

Comments
 (0)