对返回结果中以$n结尾的节点的序列化做了优化
This commit is contained in:
@@ -443,7 +443,7 @@ public class Pay2Api extends PayApi {
|
||||
map.put("sign", sign.toLowerCase());
|
||||
WeixinResponse response = weixinClient.get(refundquery_uri, map);
|
||||
return ListsuffixResultDeserializer.deserialize(response.getAsString(),
|
||||
RefundRecord.class, "refundList");
|
||||
RefundRecord.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -81,7 +81,7 @@ public class Pay3Api extends PayApi {
|
||||
String orderquery_uri = getRequestUri("orderquery_v3_uri");
|
||||
WeixinResponse response = weixinClient.post(orderquery_uri, param);
|
||||
return ListsuffixResultDeserializer.deserialize(response.getAsString(),
|
||||
Order.class, "couponList");
|
||||
Order.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -394,9 +394,8 @@ public class Pay3Api extends PayApi {
|
||||
map.put("sign", sign);
|
||||
String param = XmlStream.map2xml(map);
|
||||
WeixinResponse response = weixinClient.post(refundquery_uri, param);
|
||||
return ListsuffixResultDeserializer.deserializeHasTwoSuffix(
|
||||
response.getAsString(), RefundRecord.class, "refundList",
|
||||
"couponList");
|
||||
return ListsuffixResultDeserializer.deserialize(
|
||||
response.getAsString(), RefundRecord.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.foxinmy.weixin4j.xml.ListsuffixResult;
|
||||
@@ -48,8 +47,6 @@ public class RefundRecord extends ApiResult {
|
||||
* 退款详情
|
||||
*/
|
||||
@ListsuffixResult
|
||||
@XmlTransient
|
||||
@JSONField(deserialize = false)
|
||||
private List<RefundDetail> refundList;
|
||||
|
||||
protected RefundRecord() {
|
||||
|
||||
@@ -7,7 +7,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.foxinmy.weixin4j.mp.payment.coupon.CouponInfo;
|
||||
@@ -88,8 +87,6 @@ public class Order extends ApiResult {
|
||||
* 代金券信息 验证签名有点麻烦
|
||||
*/
|
||||
@ListsuffixResult
|
||||
@XmlTransient
|
||||
@JSONField(deserialize = false)
|
||||
private List<CouponInfo> couponList;
|
||||
/**
|
||||
* 现金支付金额
|
||||
|
||||
@@ -6,7 +6,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.foxinmy.weixin4j.mp.payment.coupon.CouponInfo;
|
||||
@@ -131,8 +130,6 @@ public class RefundDetail extends ApiResult {
|
||||
* @see com.foxinmy.weixin4j.mp.payment.coupon.CouponInfo
|
||||
*/
|
||||
@ListsuffixResult
|
||||
@XmlTransient
|
||||
@JSONField(deserialize = false)
|
||||
private List<CouponInfo> couponList;
|
||||
|
||||
protected RefundDetail() {
|
||||
|
||||
@@ -6,7 +6,6 @@ import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlTransient;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.foxinmy.weixin4j.mp.type.CurrencyType;
|
||||
@@ -89,9 +88,7 @@ public class RefundRecord extends ApiResult {
|
||||
*
|
||||
* @see com.foxinmy.weixin4j.mp.payment.v3.RefundDetail
|
||||
*/
|
||||
@ListsuffixResult
|
||||
@XmlTransient
|
||||
@JSONField(deserialize = false)
|
||||
@ListsuffixResult({ "out_refund_no(_\\d)$", "^refund_.*(_\\d)$" })
|
||||
private List<RefundDetail> refundList;
|
||||
|
||||
protected RefundRecord() {
|
||||
|
||||
Reference in New Issue
Block a user