mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 13:06:54 +08:00
代码优化
This commit is contained in:
parent
23cb2104ad
commit
66055b4a00
@ -1,10 +1,15 @@
|
|||||||
package com.github.binarywang.wxpay.bean.result;
|
package com.github.binarywang.wxpay.bean.result;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||||
import lombok.*;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
import java.util.List;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -26,7 +31,8 @@ import java.util.List;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@XStreamAlias("xml")
|
@XStreamAlias("xml")
|
||||||
public class WxPayOrderQueryResult extends BaseWxPayResult {
|
public class WxPayOrderQueryResult extends BaseWxPayResult {
|
||||||
|
private static final long serialVersionUID = 8241891654782412789L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 字段名:营销详情.
|
* 字段名:营销详情.
|
||||||
@ -41,7 +47,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String promotionDetail;
|
private String promotionDetail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>设备号
|
* <pre>
|
||||||
|
* 设备号.
|
||||||
* device_info
|
* device_info
|
||||||
* 否
|
* 否
|
||||||
* String(32)
|
* String(32)
|
||||||
@ -53,7 +60,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String deviceInfo;
|
private String deviceInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>用户标识
|
* <pre>
|
||||||
|
* 用户标识.
|
||||||
* openid
|
* openid
|
||||||
* 是
|
* 是
|
||||||
* String(128)
|
* String(128)
|
||||||
@ -65,7 +73,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String openid;
|
private String openid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>是否关注公众账号
|
* <pre>
|
||||||
|
* 是否关注公众账号.
|
||||||
* is_subscribe
|
* is_subscribe
|
||||||
* 否
|
* 否
|
||||||
* String(1)
|
* String(1)
|
||||||
@ -77,7 +86,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String isSubscribe;
|
private String isSubscribe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>交易类型
|
* <pre>
|
||||||
|
* 交易类型.
|
||||||
* trade_type
|
* trade_type
|
||||||
* 是
|
* 是
|
||||||
* String(16)
|
* String(16)
|
||||||
@ -89,7 +99,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String tradeType;
|
private String tradeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>交易状态
|
* <pre>
|
||||||
|
* 交易状态.
|
||||||
* trade_state
|
* trade_state
|
||||||
* 是
|
* 是
|
||||||
* String(32)
|
* String(32)
|
||||||
@ -101,7 +112,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String tradeState;
|
private String tradeState;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>付款银行
|
* <pre>
|
||||||
|
* 付款银行.
|
||||||
* bank_type
|
* bank_type
|
||||||
* 是
|
* 是
|
||||||
* String(16)
|
* String(16)
|
||||||
@ -113,7 +125,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String bankType;
|
private String bankType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>订单金额
|
* <pre>
|
||||||
|
* 订单金额.
|
||||||
* total_fee
|
* total_fee
|
||||||
* 是
|
* 是
|
||||||
* Int
|
* Int
|
||||||
@ -125,7 +138,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private Integer totalFee;
|
private Integer totalFee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>应结订单金额
|
* <pre>
|
||||||
|
* 应结订单金额.
|
||||||
* settlement_total_fee
|
* settlement_total_fee
|
||||||
* 否
|
* 否
|
||||||
* Int
|
* Int
|
||||||
@ -137,7 +151,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private Integer settlementTotalFee;
|
private Integer settlementTotalFee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>货币种类
|
* <pre>
|
||||||
|
* 货币种类.
|
||||||
* fee_type
|
* fee_type
|
||||||
* 否
|
* 否
|
||||||
* String(8)
|
* String(8)
|
||||||
@ -149,7 +164,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String feeType;
|
private String feeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>现金支付金额
|
* <pre>
|
||||||
|
* 现金支付金额.
|
||||||
* cash_fee
|
* cash_fee
|
||||||
* 是
|
* 是
|
||||||
* Int
|
* Int
|
||||||
@ -161,7 +177,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private Integer cashFee;
|
private Integer cashFee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>现金支付货币类型
|
* <pre>
|
||||||
|
* 现金支付货币类型.
|
||||||
* cash_fee_type
|
* cash_fee_type
|
||||||
* 否
|
* 否
|
||||||
* String(16)
|
* String(16)
|
||||||
@ -173,7 +190,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String cashFeeType;
|
private String cashFeeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>代金券金额
|
* <pre>
|
||||||
|
* 代金券金额.
|
||||||
* coupon_fee
|
* coupon_fee
|
||||||
* 否
|
* 否
|
||||||
* Int
|
* Int
|
||||||
@ -185,7 +203,7 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private Integer couponFee;
|
private Integer couponFee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>代金券使用数量
|
* <pre>代金券使用数量.
|
||||||
* coupon_count
|
* coupon_count
|
||||||
* 否
|
* 否
|
||||||
* Int
|
* Int
|
||||||
@ -198,7 +216,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
|
|
||||||
private List<Coupon> coupons;
|
private List<Coupon> coupons;
|
||||||
/**
|
/**
|
||||||
* <pre>微信支付订单号
|
* <pre>
|
||||||
|
* 微信支付订单号.
|
||||||
* transaction_id
|
* transaction_id
|
||||||
* 是
|
* 是
|
||||||
* String(32)
|
* String(32)
|
||||||
@ -209,7 +228,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
@XStreamAlias("transaction_id")
|
@XStreamAlias("transaction_id")
|
||||||
private String transactionId;
|
private String transactionId;
|
||||||
/**
|
/**
|
||||||
* <pre>商户订单号
|
* <pre>
|
||||||
|
* 商户订单号.
|
||||||
* out_trade_no
|
* out_trade_no
|
||||||
* 是
|
* 是
|
||||||
* String(32)
|
* String(32)
|
||||||
@ -220,7 +240,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
@XStreamAlias("out_trade_no")
|
@XStreamAlias("out_trade_no")
|
||||||
private String outTradeNo;
|
private String outTradeNo;
|
||||||
/**
|
/**
|
||||||
* <pre>附加数据
|
* <pre>
|
||||||
|
* 附加数据.
|
||||||
* attach
|
* attach
|
||||||
* 否
|
* 否
|
||||||
* String(128)
|
* String(128)
|
||||||
@ -231,7 +252,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
@XStreamAlias("attach")
|
@XStreamAlias("attach")
|
||||||
private String attach;
|
private String attach;
|
||||||
/**
|
/**
|
||||||
* <pre>支付完成时间
|
* <pre>
|
||||||
|
* 支付完成时间.
|
||||||
* time_end
|
* time_end
|
||||||
* 是
|
* 是
|
||||||
* String(14)
|
* String(14)
|
||||||
@ -242,7 +264,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
@XStreamAlias("time_end")
|
@XStreamAlias("time_end")
|
||||||
private String timeEnd;
|
private String timeEnd;
|
||||||
/**
|
/**
|
||||||
* <pre>交易状态描述
|
* <pre>
|
||||||
|
* 交易状态描述.
|
||||||
* trade_state_desc
|
* trade_state_desc
|
||||||
* 是
|
* 是
|
||||||
* String(256)
|
* String(256)
|
||||||
@ -254,7 +277,7 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String tradeStateDesc;
|
private String tradeStateDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过xml组装coupons属性内容
|
* 通过xml组装coupons属性内容.
|
||||||
*/
|
*/
|
||||||
public void composeCoupons() {
|
public void composeCoupons() {
|
||||||
if (this.couponCount != null && this.couponCount > 0) {
|
if (this.couponCount != null && this.couponCount > 0) {
|
||||||
@ -273,9 +296,12 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
@Data
|
@Data
|
||||||
@Builder(builderMethodName = "newBuilder")
|
@Builder(builderMethodName = "newBuilder")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class Coupon {
|
public static class Coupon implements Serializable {
|
||||||
|
private static final long serialVersionUID = -954000582332155081L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>代金券类型
|
* <pre>
|
||||||
|
* 代金券类型.
|
||||||
* coupon_type_$n
|
* coupon_type_$n
|
||||||
* 否
|
* 否
|
||||||
* String
|
* String
|
||||||
@ -288,7 +314,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String couponType;
|
private String couponType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>代金券ID
|
* <pre>
|
||||||
|
* 代金券ID.
|
||||||
* coupon_id_$n
|
* coupon_id_$n
|
||||||
* 否
|
* 否
|
||||||
* String(20)
|
* String(20)
|
||||||
@ -299,7 +326,8 @@ public class WxPayOrderQueryResult extends BaseWxPayResult {
|
|||||||
private String couponId;
|
private String couponId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>单个代金券支付金额
|
* <pre>
|
||||||
|
* 单个代金券支付金额.
|
||||||
* coupon_fee_$n
|
* coupon_fee_$n
|
||||||
* 否
|
* 否
|
||||||
* Int
|
* Int
|
||||||
|
Loading…
Reference in New Issue
Block a user