From d8250cb25e82d6cbba9881c81fb64795b0ad51d5 Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 16 Dec 2017 13:28:49 +0800 Subject: [PATCH] =?UTF-8?q?#399=20=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=80=80=E6=AC=BE=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E2=80=9C=E4=BB=A3=E9=87=91=E5=88=B8=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E2=80=9D=E5=AD=97=E6=AE=B5=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bean/result/WxPayRefundQueryResult.java | 52 +++++++------------ 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxPayRefundQueryResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxPayRefundQueryResult.java index 2fad8f2e..1c7b0da4 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxPayRefundQueryResult.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxPayRefundQueryResult.java @@ -141,7 +141,6 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { refundRecord.setRefundChannel(this.getXmlValue("xml/refund_channel_" + i)); refundRecord.setRefundFee(this.getXmlValueAsInt("xml/refund_fee_" + i)); refundRecord.setSettlementRefundFee(this.getXmlValueAsInt("xml/settlement_refund_fee_" + i)); - refundRecord.setCouponType(this.getXmlValue("xml/coupon_type_" + i)); refundRecord.setCouponRefundFee(this.getXmlValueAsInt("xml/coupon_refund_fee_" + i)); refundRecord.setCouponRefundCount(this.getXmlValueAsInt("xml/coupon_refund_count_" + i)); refundRecord.setRefundStatus(this.getXmlValue("xml/refund_status_" + i)); @@ -157,7 +156,8 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { coupons.add( new RefundRecord.RefundCoupon( this.getXmlValue("xml/coupon_refund_id_" + i + "_" + j), - this.getXmlValueAsInt("xml/coupon_refund_fee_" + i + "_" + j) + this.getXmlValueAsInt("xml/coupon_refund_fee_" + i + "_" + j), + this.getXmlValue("xml/coupon_type_" + i + "_" + j) ) ); } @@ -251,19 +251,6 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { @XStreamAlias("refund_account") private String refundAccount; - /** - *
-     * 字段名:代金券类型.
-     * 变量名:coupon_type_$n
-     * 是否必填:否
-     * 类型:Int
-     * 示例值:CASH
-     * 描述:CASH--充值代金券 , NO_CASH---非充值代金券。订单使用代金券时有返回(取值:CASH、NO_CASH)。$n为下标,从0开始编号,举例:coupon_type_$0
-     * 
- */ - @XStreamAlias("coupon_type") - private String couponType; - /** *
      * 字段名:代金券退款金额.
@@ -338,22 +325,8 @@ public class WxPayRefundQueryResult extends WxPayBaseResult {
 
     @Data
     @NoArgsConstructor
+    @AllArgsConstructor
     public static class RefundCoupon {
-      /**
-       * 
-       * 字段名:退款代金券批次ID.
-       * 变量名:coupon_refund_batch_id_$n_$m
-       * 是否必填:否
-       * 类型:String(20)
-       * 示例值:100
-       * 描述:退款代金券批次ID ,$n为下标,$m为下标,从0开始编号
-       * 
- * - * @deprecated 貌似是被去掉了,但不知是何时! - */ - @XStreamAlias("coupon_refund_batch_id") - private String couponRefundBatchId; - /** *
        * 字段名:退款代金券ID.
@@ -380,10 +353,21 @@ public class WxPayRefundQueryResult extends WxPayBaseResult {
       @XStreamAlias("coupon_refund_fee")
       private Integer couponRefundFee;
 
-      public RefundCoupon(String couponRefundId, Integer couponRefundFee) {
-        this.couponRefundId = couponRefundId;
-        this.couponRefundFee = couponRefundFee;
-      }
+      /**
+       * 
+       * 字段名:代金券类型.
+       * 变量名:coupon_type_$n_$m
+       * 是否必填:否
+       * 类型:String(8)
+       * 示例值:CASH
+       * 描述:CASH--充值代金券 , NO_CASH---非充值代金券。
+       * 开通免充值券功能,并且订单使用了优惠券后有返回(取值:CASH、NO_CASH)。
+       * $n为下标,$m为下标,从0开始编号,举例:coupon_type_$0_$1
+       * 
+ */ + @XStreamAlias("coupon_type") + private String couponType; + }