| @@ -1,5 +1,8 @@ | |||
| package com.github.binarywang.wxpay.bean; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| * 微信支付接口请求数据封装对象 | |||
| @@ -8,6 +11,8 @@ package com.github.binarywang.wxpay.bean; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @NoArgsConstructor | |||
| public class WxPayApiData { | |||
| /** | |||
| * 接口请求地址 | |||
| @@ -42,38 +47,6 @@ public class WxPayApiData { | |||
| this.exceptionMsg = exceptionMsg; | |||
| } | |||
| public String getUrl() { | |||
| return this.url; | |||
| } | |||
| public void setUrl(String url) { | |||
| this.url = url; | |||
| } | |||
| public String getRequestData() { | |||
| return this.requestData; | |||
| } | |||
| public void setRequestData(String requestData) { | |||
| this.requestData = requestData; | |||
| } | |||
| public String getResponseData() { | |||
| return this.responseData; | |||
| } | |||
| public void setResponseData(String responseData) { | |||
| this.responseData = responseData; | |||
| } | |||
| public String getExceptionMsg() { | |||
| return this.exceptionMsg; | |||
| } | |||
| public void setExceptionMsg(String exceptionMsg) { | |||
| this.exceptionMsg = exceptionMsg; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| if (this.exceptionMsg != null) { | |||
| @@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.coupon; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayBaseRequest; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| /** | |||
| @@ -12,8 +13,13 @@ import me.chanjar.weixin.common.annotation.Required; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayCouponInfoQueryRequest extends WxPayBaseRequest { | |||
| public class WxPayCouponInfoQueryRequest extends WxPayBaseRequest { | |||
| /** | |||
| * <pre> | |||
| * 字段名:代金券id | |||
| @@ -108,173 +114,10 @@ public class WxPayCouponInfoQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("type") | |||
| private String type; | |||
| private WxPayCouponInfoQueryRequest(Builder builder) { | |||
| setAppid(builder.appid); | |||
| setMchId(builder.mchId); | |||
| setSubAppId(builder.subAppId); | |||
| setSubMchId(builder.subMchId); | |||
| setNonceStr(builder.nonceStr); | |||
| setSign(builder.sign); | |||
| setCouponId(builder.couponId); | |||
| setStockId(builder.stockId); | |||
| setOpenid(builder.openid); | |||
| setOpUserId(builder.opUserId); | |||
| setDeviceInfo(builder.deviceInfo); | |||
| setVersion(builder.version); | |||
| setType(builder.type); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getCouponId() { | |||
| return this.couponId; | |||
| } | |||
| public void setCouponId(String couponId) { | |||
| this.couponId = couponId; | |||
| } | |||
| public String getStockId() { | |||
| return this.stockId; | |||
| } | |||
| public void setStockId(String stockId) { | |||
| this.stockId = stockId; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getOpUserId() { | |||
| return this.opUserId; | |||
| } | |||
| public void setOpUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getVersion() { | |||
| return this.version; | |||
| } | |||
| public void setVersion(String version) { | |||
| this.version = version; | |||
| } | |||
| public String getType() { | |||
| return this.type; | |||
| } | |||
| public void setType(String type) { | |||
| this.type = type; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| } | |||
| public static final class Builder { | |||
| private String appid; | |||
| private String mchId; | |||
| private String subAppId; | |||
| private String subMchId; | |||
| private String nonceStr; | |||
| private String sign; | |||
| private String couponId; | |||
| private String stockId; | |||
| private String openid; | |||
| private String opUserId; | |||
| private String deviceInfo; | |||
| private String version; | |||
| private String type; | |||
| private Builder() { | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder couponId(String couponId) { | |||
| this.couponId = couponId; | |||
| return this; | |||
| } | |||
| public Builder stockId(String stockId) { | |||
| this.stockId = stockId; | |||
| return this; | |||
| } | |||
| public Builder openid(String openid) { | |||
| this.openid = openid; | |||
| return this; | |||
| } | |||
| public Builder opUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| return this; | |||
| } | |||
| public Builder deviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| return this; | |||
| } | |||
| public Builder version(String version) { | |||
| this.version = version; | |||
| return this; | |||
| } | |||
| public Builder type(String type) { | |||
| this.type = type; | |||
| return this; | |||
| } | |||
| public WxPayCouponInfoQueryRequest build() { | |||
| return new WxPayCouponInfoQueryRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -2,6 +2,9 @@ package com.github.binarywang.wxpay.bean.coupon; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayBaseResult; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| @@ -11,6 +14,9 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayCouponInfoQueryResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -221,131 +227,4 @@ public class WxPayCouponInfoQueryResult extends WxPayBaseResult { | |||
| @XStreamAlias("is_partial_use") | |||
| private String isPartialUse; | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getCouponStockId() { | |||
| return this.couponStockId; | |||
| } | |||
| public void setCouponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| } | |||
| public String getCouponId() { | |||
| return this.couponId; | |||
| } | |||
| public void setCouponId(String couponId) { | |||
| this.couponId = couponId; | |||
| } | |||
| public Integer getCouponValue() { | |||
| return this.couponValue; | |||
| } | |||
| public void setCouponValue(Integer couponValue) { | |||
| this.couponValue = couponValue; | |||
| } | |||
| public Integer getCouponMininum() { | |||
| return this.couponMininum; | |||
| } | |||
| public void setCouponMininum(Integer couponMininum) { | |||
| this.couponMininum = couponMininum; | |||
| } | |||
| public String getCouponName() { | |||
| return this.couponName; | |||
| } | |||
| public void setCouponName(String couponName) { | |||
| this.couponName = couponName; | |||
| } | |||
| public Integer getCouponState() { | |||
| return this.couponState; | |||
| } | |||
| public void setCouponState(Integer couponState) { | |||
| this.couponState = couponState; | |||
| } | |||
| public String getCouponDesc() { | |||
| return this.couponDesc; | |||
| } | |||
| public void setCouponDesc(String couponDesc) { | |||
| this.couponDesc = couponDesc; | |||
| } | |||
| public Integer getCouponUseValue() { | |||
| return this.couponUseValue; | |||
| } | |||
| public void setCouponUseValue(Integer couponUseValue) { | |||
| this.couponUseValue = couponUseValue; | |||
| } | |||
| public Integer getCouponRemainValue() { | |||
| return this.couponRemainValue; | |||
| } | |||
| public void setCouponRemainValue(Integer couponRemainValue) { | |||
| this.couponRemainValue = couponRemainValue; | |||
| } | |||
| public String getBeginTime() { | |||
| return this.beginTime; | |||
| } | |||
| public void setBeginTime(String beginTime) { | |||
| this.beginTime = beginTime; | |||
| } | |||
| public String getEndTime() { | |||
| return this.endTime; | |||
| } | |||
| public void setEndTime(String endTime) { | |||
| this.endTime = endTime; | |||
| } | |||
| public String getSendTime() { | |||
| return this.sendTime; | |||
| } | |||
| public void setSendTime(String sendTime) { | |||
| this.sendTime = sendTime; | |||
| } | |||
| public String getConsumerMchId() { | |||
| return this.consumerMchId; | |||
| } | |||
| public void setConsumerMchId(String consumerMchId) { | |||
| this.consumerMchId = consumerMchId; | |||
| } | |||
| public String getSendSource() { | |||
| return this.sendSource; | |||
| } | |||
| public void setSendSource(String sendSource) { | |||
| this.sendSource = sendSource; | |||
| } | |||
| public String getIsPartialUse() { | |||
| return this.isPartialUse; | |||
| } | |||
| public void setIsPartialUse(String isPartialUse) { | |||
| this.isPartialUse = isPartialUse; | |||
| } | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.coupon; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayBaseRequest; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| /** | |||
| @@ -12,6 +13,12 @@ import me.chanjar.weixin.common.annotation.Required; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayCouponSendRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -122,190 +129,8 @@ public class WxPayCouponSendRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("type") | |||
| private String type; | |||
| public WxPayCouponSendRequest() { | |||
| } | |||
| private WxPayCouponSendRequest(Builder builder) { | |||
| setAppid(builder.appid); | |||
| setMchId(builder.mchId); | |||
| setSubAppId(builder.subAppId); | |||
| setSubMchId(builder.subMchId); | |||
| setNonceStr(builder.nonceStr); | |||
| setSign(builder.sign); | |||
| setCouponStockId(builder.couponStockId); | |||
| setOpenidCount(builder.openidCount); | |||
| setPartnerTradeNo(builder.partnerTradeNo); | |||
| setOpenid(builder.openid); | |||
| setOpUserId(builder.opUserId); | |||
| setDeviceInfo(builder.deviceInfo); | |||
| setVersion(builder.version); | |||
| setType(builder.type); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getCouponStockId() { | |||
| return this.couponStockId; | |||
| } | |||
| public void setCouponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| } | |||
| public Integer getOpenidCount() { | |||
| return this.openidCount; | |||
| } | |||
| public void setOpenidCount(Integer openidCount) { | |||
| this.openidCount = openidCount; | |||
| } | |||
| public String getPartnerTradeNo() { | |||
| return this.partnerTradeNo; | |||
| } | |||
| public void setPartnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getOpUserId() { | |||
| return this.opUserId; | |||
| } | |||
| public void setOpUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getVersion() { | |||
| return this.version; | |||
| } | |||
| public void setVersion(String version) { | |||
| this.version = version; | |||
| } | |||
| public String getType() { | |||
| return this.type; | |||
| } | |||
| public void setType(String type) { | |||
| this.type = type; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| } | |||
| public static final class Builder { | |||
| private String appid; | |||
| private String mchId; | |||
| private String subAppId; | |||
| private String subMchId; | |||
| private String nonceStr; | |||
| private String sign; | |||
| private String couponStockId; | |||
| private Integer openidCount; | |||
| private String partnerTradeNo; | |||
| private String openid; | |||
| private String opUserId; | |||
| private String deviceInfo; | |||
| private String version; | |||
| private String type; | |||
| private Builder() { | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder couponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| return this; | |||
| } | |||
| public Builder openidCount(Integer openidCount) { | |||
| this.openidCount = openidCount; | |||
| return this; | |||
| } | |||
| public Builder partnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| return this; | |||
| } | |||
| public Builder openid(String openid) { | |||
| this.openid = openid; | |||
| return this; | |||
| } | |||
| public Builder opUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| return this; | |||
| } | |||
| public Builder deviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| return this; | |||
| } | |||
| public Builder version(String version) { | |||
| this.version = version; | |||
| return this; | |||
| } | |||
| public Builder type(String type) { | |||
| this.type = type; | |||
| return this; | |||
| } | |||
| public WxPayCouponSendRequest build() { | |||
| return new WxPayCouponSendRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -2,6 +2,9 @@ package com.github.binarywang.wxpay.bean.coupon; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayBaseResult; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| @@ -11,6 +14,9 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayCouponSendResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -130,75 +136,4 @@ public class WxPayCouponSendResult extends WxPayBaseResult { | |||
| @XStreamAlias("ret_msg") | |||
| private String retMsg; | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getCouponStockId() { | |||
| return this.couponStockId; | |||
| } | |||
| public void setCouponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| } | |||
| public Integer getRespCount() { | |||
| return this.respCount; | |||
| } | |||
| public void setRespCount(Integer respCount) { | |||
| this.respCount = respCount; | |||
| } | |||
| public Integer getSuccessCount() { | |||
| return this.successCount; | |||
| } | |||
| public void setSuccessCount(Integer successCount) { | |||
| this.successCount = successCount; | |||
| } | |||
| public Integer getFailedCount() { | |||
| return this.failedCount; | |||
| } | |||
| public void setFailedCount(Integer failedCount) { | |||
| this.failedCount = failedCount; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getRetCode() { | |||
| return this.retCode; | |||
| } | |||
| public void setRetCode(String retCode) { | |||
| this.retCode = retCode; | |||
| } | |||
| public String getCouponId() { | |||
| return this.couponId; | |||
| } | |||
| public void setCouponId(String couponId) { | |||
| this.couponId = couponId; | |||
| } | |||
| public String getRetMsg() { | |||
| return this.retMsg; | |||
| } | |||
| public void setRetMsg(String retMsg) { | |||
| this.retMsg = retMsg; | |||
| } | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.coupon; | |||
| import com.github.binarywang.wxpay.bean.request.WxPayBaseRequest; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| /** | |||
| @@ -12,6 +13,12 @@ import me.chanjar.weixin.common.annotation.Required; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayCouponStockQueryRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -80,142 +87,9 @@ public class WxPayCouponStockQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("type") | |||
| private String type; | |||
| private WxPayCouponStockQueryRequest(Builder builder) { | |||
| setAppid(builder.appid); | |||
| setMchId(builder.mchId); | |||
| setSubAppId(builder.subAppId); | |||
| setSubMchId(builder.subMchId); | |||
| setNonceStr(builder.nonceStr); | |||
| setSign(builder.sign); | |||
| setCouponStockId(builder.couponStockId); | |||
| setOpUserId(builder.opUserId); | |||
| setDeviceInfo(builder.deviceInfo); | |||
| setVersion(builder.version); | |||
| setType(builder.type); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getCouponStockId() { | |||
| return this.couponStockId; | |||
| } | |||
| public void setCouponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| } | |||
| public String getOpUserId() { | |||
| return this.opUserId; | |||
| } | |||
| public void setOpUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getVersion() { | |||
| return this.version; | |||
| } | |||
| public void setVersion(String version) { | |||
| this.version = version; | |||
| } | |||
| public String getType() { | |||
| return this.type; | |||
| } | |||
| public void setType(String type) { | |||
| this.type = type; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| } | |||
| public static final class Builder { | |||
| private String appid; | |||
| private String mchId; | |||
| private String subAppId; | |||
| private String subMchId; | |||
| private String nonceStr; | |||
| private String sign; | |||
| private String couponStockId; | |||
| private String opUserId; | |||
| private String deviceInfo; | |||
| private String version; | |||
| private String type; | |||
| private Builder() { | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder couponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| return this; | |||
| } | |||
| public Builder opUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| return this; | |||
| } | |||
| public Builder deviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| return this; | |||
| } | |||
| public Builder version(String version) { | |||
| this.version = version; | |||
| return this; | |||
| } | |||
| public Builder type(String type) { | |||
| this.type = type; | |||
| return this; | |||
| } | |||
| public WxPayCouponStockQueryRequest build() { | |||
| return new WxPayCouponStockQueryRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -2,6 +2,10 @@ package com.github.binarywang.wxpay.bean.coupon; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayBaseResult; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.AllArgsConstructor; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| @@ -11,6 +15,10 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayCouponStockQueryResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -182,107 +190,4 @@ public class WxPayCouponStockQueryResult extends WxPayBaseResult { | |||
| @XStreamAlias("coupon_budget") | |||
| private Integer couponBudget; | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getCouponStockId() { | |||
| return this.couponStockId; | |||
| } | |||
| public void setCouponStockId(String couponStockId) { | |||
| this.couponStockId = couponStockId; | |||
| } | |||
| public String getCouponName() { | |||
| return this.couponName; | |||
| } | |||
| public void setCouponName(String couponName) { | |||
| this.couponName = couponName; | |||
| } | |||
| public Integer getCouponValue() { | |||
| return this.couponValue; | |||
| } | |||
| public void setCouponValue(Integer couponValue) { | |||
| this.couponValue = couponValue; | |||
| } | |||
| public Integer getCouponMininumn() { | |||
| return this.couponMininumn; | |||
| } | |||
| public void setCouponMininumn(Integer couponMininumn) { | |||
| this.couponMininumn = couponMininumn; | |||
| } | |||
| public Integer getCouponStockStatus() { | |||
| return this.couponStockStatus; | |||
| } | |||
| public void setCouponStockStatus(Integer couponStockStatus) { | |||
| this.couponStockStatus = couponStockStatus; | |||
| } | |||
| public Integer getCouponTotal() { | |||
| return this.couponTotal; | |||
| } | |||
| public void setCouponTotal(Integer couponTotal) { | |||
| this.couponTotal = couponTotal; | |||
| } | |||
| public Integer getMaxQuota() { | |||
| return this.maxQuota; | |||
| } | |||
| public void setMaxQuota(Integer maxQuota) { | |||
| this.maxQuota = maxQuota; | |||
| } | |||
| public Integer getIsSendNum() { | |||
| return this.isSendNum; | |||
| } | |||
| public void setIsSendNum(Integer isSendNum) { | |||
| this.isSendNum = isSendNum; | |||
| } | |||
| public String getBeginTime() { | |||
| return this.beginTime; | |||
| } | |||
| public void setBeginTime(String beginTime) { | |||
| this.beginTime = beginTime; | |||
| } | |||
| public String getEndTime() { | |||
| return this.endTime; | |||
| } | |||
| public void setEndTime(String endTime) { | |||
| this.endTime = endTime; | |||
| } | |||
| public String getCreateTime() { | |||
| return this.createTime; | |||
| } | |||
| public void setCreateTime(String createTime) { | |||
| this.createTime = createTime; | |||
| } | |||
| public Integer getCouponBudget() { | |||
| return this.couponBudget; | |||
| } | |||
| public void setCouponBudget(Integer couponBudget) { | |||
| this.couponBudget = couponBudget; | |||
| } | |||
| } | |||
| @@ -4,12 +4,20 @@ import com.thoughtworks.xstream.XStream; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import com.thoughtworks.xstream.annotations.XStreamConverter; | |||
| import com.thoughtworks.xstream.annotations.XStreamOmitField; | |||
| import lombok.AllArgsConstructor; | |||
| import lombok.Builder; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| import me.chanjar.weixin.common.util.xml.XStreamCDataConverter; | |||
| import me.chanjar.weixin.common.util.xml.XStreamInitializer; | |||
| /** | |||
| * 微信支付订单和退款的异步通知共用的响应类 | |||
| */ | |||
| @Data | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayNotifyResponse { | |||
| @XStreamOmitField | |||
| @@ -24,16 +32,6 @@ public class WxPayNotifyResponse { | |||
| @XStreamAlias("return_msg") | |||
| private String returnMsg; | |||
| public WxPayNotifyResponse() { | |||
| super(); | |||
| } | |||
| public WxPayNotifyResponse(String returnCode, String returnMsg) { | |||
| super(); | |||
| this.returnCode = returnCode; | |||
| this.returnMsg = returnMsg; | |||
| } | |||
| public static String fail(String msg) { | |||
| WxPayNotifyResponse response = new WxPayNotifyResponse(FAIL, msg); | |||
| XStream xstream = XStreamInitializer.getInstance(); | |||
| @@ -48,19 +46,4 @@ public class WxPayNotifyResponse { | |||
| return xstream.toXML(response); | |||
| } | |||
| public String getReturnCode() { | |||
| return returnCode; | |||
| } | |||
| public void setReturnCode(String returnCode) { | |||
| this.returnCode = returnCode; | |||
| } | |||
| public String getReturnMsg() { | |||
| return returnMsg; | |||
| } | |||
| public void setReturnMsg(String returnMsg) { | |||
| this.returnMsg = returnMsg; | |||
| } | |||
| } | |||
| @@ -1,7 +1,8 @@ | |||
| package com.github.binarywang.wxpay.bean.notify; | |||
| import org.apache.commons.lang3.builder.ToStringBuilder; | |||
| import org.apache.commons.lang3.builder.ToStringStyle; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| import java.io.Serializable; | |||
| import java.util.HashMap; | |||
| @@ -10,6 +11,8 @@ import java.util.Map; | |||
| /** | |||
| * 支付异步通知代金券详细 | |||
| */ | |||
| @Data | |||
| @NoArgsConstructor | |||
| public class WxPayOrderNotifyCoupon implements Serializable { | |||
| private static final long serialVersionUID = -4165343733538156097L; | |||
| @@ -17,30 +20,6 @@ public class WxPayOrderNotifyCoupon implements Serializable { | |||
| private String couponType; | |||
| private Integer couponFee; | |||
| public String getCouponId() { | |||
| return couponId; | |||
| } | |||
| public void setCouponId(String couponId) { | |||
| this.couponId = couponId; | |||
| } | |||
| public String getCouponType() { | |||
| return couponType; | |||
| } | |||
| public void setCouponType(String couponType) { | |||
| this.couponType = couponType; | |||
| } | |||
| public Integer getCouponFee() { | |||
| return couponFee; | |||
| } | |||
| public void setCouponFee(Integer couponFee) { | |||
| this.couponFee = couponFee; | |||
| } | |||
| public Map<String, String> toMap(int index) { | |||
| Map<String, String> map = new HashMap<>(); | |||
| map.put("coupon_id_" + index, this.getCouponId()); | |||
| @@ -51,6 +30,6 @@ public class WxPayOrderNotifyCoupon implements Serializable { | |||
| @Override | |||
| public String toString() { | |||
| return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | |||
| return ToStringUtils.toSimpleString(this); | |||
| } | |||
| } | |||
| @@ -4,6 +4,9 @@ import com.github.binarywang.wxpay.bean.result.WxPayBaseResult; | |||
| import com.github.binarywang.wxpay.converter.WxPayOrderNotifyResultConverter; | |||
| import com.thoughtworks.xstream.XStream; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| import me.chanjar.weixin.common.util.BeanUtils; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| import me.chanjar.weixin.common.util.xml.XStreamInitializer; | |||
| @@ -18,6 +21,9 @@ import java.util.Map; | |||
| * @author aimilin6688 | |||
| * @since 2.5.0 | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderNotifyResult extends WxPayBaseResult implements Serializable { | |||
| private static final long serialVersionUID = 5389718115223345496L; | |||
| @@ -262,158 +268,6 @@ public class WxPayOrderNotifyResult extends WxPayBaseResult implements Serializa | |||
| return result; | |||
| } | |||
| public Integer getCouponCount() { | |||
| return couponCount; | |||
| } | |||
| public void setCouponCount(Integer couponCount) { | |||
| this.couponCount = couponCount; | |||
| } | |||
| public List<WxPayOrderNotifyCoupon> getCouponList() { | |||
| return couponList; | |||
| } | |||
| public void setCouponList(List<WxPayOrderNotifyCoupon> couponList) { | |||
| this.couponList = couponList; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getOpenid() { | |||
| return openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getIsSubscribe() { | |||
| return isSubscribe; | |||
| } | |||
| public void setIsSubscribe(String isSubscribe) { | |||
| this.isSubscribe = isSubscribe; | |||
| } | |||
| public String getTradeType() { | |||
| return tradeType; | |||
| } | |||
| public void setTradeType(String tradeType) { | |||
| this.tradeType = tradeType; | |||
| } | |||
| public String getBankType() { | |||
| return bankType; | |||
| } | |||
| public void setBankType(String bankType) { | |||
| this.bankType = bankType; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public Integer getSettlementTotalFee() { | |||
| return settlementTotalFee; | |||
| } | |||
| public void setSettlementTotalFee(Integer settlementTotalFee) { | |||
| this.settlementTotalFee = settlementTotalFee; | |||
| } | |||
| public String getFeeType() { | |||
| return feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public Integer getCashFee() { | |||
| return cashFee; | |||
| } | |||
| public void setCashFee(Integer cashFee) { | |||
| this.cashFee = cashFee; | |||
| } | |||
| public String getCashFeeType() { | |||
| return cashFeeType; | |||
| } | |||
| public void setCashFeeType(String cashFeeType) { | |||
| this.cashFeeType = cashFeeType; | |||
| } | |||
| public Integer getCouponFee() { | |||
| return couponFee; | |||
| } | |||
| public void setCouponFee(Integer couponFee) { | |||
| this.couponFee = couponFee; | |||
| } | |||
| public String getTransactionId() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getAttach() { | |||
| return attach; | |||
| } | |||
| public void setAttach(String attach) { | |||
| this.attach = attach; | |||
| } | |||
| public String getTimeEnd() { | |||
| return timeEnd; | |||
| } | |||
| public void setTimeEnd(String timeEnd) { | |||
| this.timeEnd = timeEnd; | |||
| } | |||
| public String getSubOpenid() { | |||
| return this.subOpenid; | |||
| } | |||
| public void setSubOpenid(String subOpenid) { | |||
| this.subOpenid = subOpenid; | |||
| } | |||
| public String getSubIsSubscribe() { | |||
| return this.subIsSubscribe; | |||
| } | |||
| public void setSubIsSubscribe(String subIsSubscribe) { | |||
| this.subIsSubscribe = subIsSubscribe; | |||
| } | |||
| @Override | |||
| public Map<String, String> toMap() { | |||
| Map<String, String> resultMap = BeanUtils.xmlBean2Map(this); | |||
| @@ -4,6 +4,10 @@ import com.github.binarywang.wxpay.bean.result.WxPayBaseResult; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.XStream; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.AllArgsConstructor; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| import me.chanjar.weixin.common.util.xml.XStreamInitializer; | |||
| import org.apache.commons.codec.binary.Base64; | |||
| @@ -22,6 +26,10 @@ import java.security.MessageDigest; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRefundNotifyResult extends WxPayBaseResult implements Serializable { | |||
| private static final long serialVersionUID = 4651725860079259186L; | |||
| @@ -68,6 +76,8 @@ public class WxPayRefundNotifyResult extends WxPayBaseResult implements Serializ | |||
| /** | |||
| * 加密信息字段解密后的内容 | |||
| */ | |||
| @Data | |||
| @NoArgsConstructor | |||
| @XStreamAlias("root") | |||
| public static class ReqInfo { | |||
| @Override | |||
| @@ -243,110 +253,6 @@ public class WxPayRefundNotifyResult extends WxPayBaseResult implements Serializ | |||
| @XStreamAlias("refund_request_source") | |||
| private String refundRequestSource; | |||
| public String getTransactionId() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getRefundId() { | |||
| return refundId; | |||
| } | |||
| public void setRefundId(String refundId) { | |||
| this.refundId = refundId; | |||
| } | |||
| public String getOutRefundNo() { | |||
| return outRefundNo; | |||
| } | |||
| public void setOutRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public Integer getSettlementTotalFee() { | |||
| return settlementTotalFee; | |||
| } | |||
| public void setSettlementTotalFee(Integer settlementTotalFee) { | |||
| this.settlementTotalFee = settlementTotalFee; | |||
| } | |||
| public Integer getRefundFee() { | |||
| return refundFee; | |||
| } | |||
| public void setRefundFee(Integer refundFee) { | |||
| this.refundFee = refundFee; | |||
| } | |||
| public Integer getSettlementRefundFee() { | |||
| return settlementRefundFee; | |||
| } | |||
| public void setSettlementRefundFee(Integer settlementRefundFee) { | |||
| this.settlementRefundFee = settlementRefundFee; | |||
| } | |||
| public String getRefundStatus() { | |||
| return refundStatus; | |||
| } | |||
| public void setRefundStatus(String refundStatus) { | |||
| this.refundStatus = refundStatus; | |||
| } | |||
| public String getSuccessTime() { | |||
| return successTime; | |||
| } | |||
| public void setSuccessTime(String successTime) { | |||
| this.successTime = successTime; | |||
| } | |||
| public String getRefundRecvAccout() { | |||
| return refundRecvAccout; | |||
| } | |||
| public void setRefundRecvAccout(String refundRecvAccout) { | |||
| this.refundRecvAccout = refundRecvAccout; | |||
| } | |||
| public String getRefundAccount() { | |||
| return refundAccount; | |||
| } | |||
| public void setRefundAccount(String refundAccount) { | |||
| this.refundAccount = refundAccount; | |||
| } | |||
| public String getRefundRequestSource() { | |||
| return refundRequestSource; | |||
| } | |||
| public void setRefundRequestSource(String refundRequestSource) { | |||
| this.refundRequestSource = refundRequestSource; | |||
| } | |||
| public static ReqInfo fromXML(String xmlString) { | |||
| XStream xstream = XStreamInitializer.getInstance(); | |||
| xstream.processAnnotations(ReqInfo.class); | |||
| @@ -354,19 +260,4 @@ public class WxPayRefundNotifyResult extends WxPayBaseResult implements Serializ | |||
| } | |||
| } | |||
| public String getReqInfoString() { | |||
| return reqInfoString; | |||
| } | |||
| public void setReqInfoString(String reqInfoString) { | |||
| this.reqInfoString = reqInfoString; | |||
| } | |||
| public ReqInfo getReqInfo() { | |||
| return reqInfo; | |||
| } | |||
| public void setReqInfo(ReqInfo reqInfo) { | |||
| this.reqInfo = reqInfo; | |||
| } | |||
| } | |||
| @@ -1,9 +1,16 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| package com.github.binarywang.wxpay.bean.notify; | |||
| import com.github.binarywang.wxpay.bean.result.WxPayBaseResult; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| import java.io.Serializable; | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| public class WxScanPayNotifyResult extends WxPayBaseResult implements Serializable { | |||
| private static final long serialVersionUID = 3381324564266118986L; | |||
| @@ -13,12 +20,4 @@ public class WxScanPayNotifyResult extends WxPayBaseResult implements Serializab | |||
| @XStreamAlias("prepay_id") | |||
| private String prepayId; | |||
| public String getPrepayId() { | |||
| return prepayId; | |||
| } | |||
| public void setPrepayId(String prepayId) { | |||
| this.prepayId = prepayId; | |||
| } | |||
| } | |||
| @@ -1,5 +1,8 @@ | |||
| package com.github.binarywang.wxpay.bean.order; | |||
| import lombok.Builder; | |||
| import lombok.Data; | |||
| /** | |||
| * <pre> | |||
| * APP支付调用统一下单接口后的组装所需参数的实现类 | |||
| @@ -9,6 +12,8 @@ package com.github.binarywang.wxpay.bean.order; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @Builder | |||
| public class WxPayAppOrderResult { | |||
| private String sign; | |||
| private String prepayId; | |||
| @@ -17,129 +22,4 @@ public class WxPayAppOrderResult { | |||
| private String packageValue; | |||
| private String timeStamp; | |||
| private String nonceStr; | |||
| public WxPayAppOrderResult() { | |||
| } | |||
| private WxPayAppOrderResult(Builder builder) { | |||
| setSign(builder.sign); | |||
| setPrepayId(builder.prepayId); | |||
| setPartnerId(builder.partnerId); | |||
| setAppId(builder.appId); | |||
| setPackageValue(builder.packageValue); | |||
| setTimeStamp(builder.timeStamp); | |||
| setNonceStr(builder.nonceStr); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getSign() { | |||
| return this.sign; | |||
| } | |||
| public void setSign(String sign) { | |||
| this.sign = sign; | |||
| } | |||
| public String getPrepayId() { | |||
| return this.prepayId; | |||
| } | |||
| public void setPrepayId(String prepayId) { | |||
| this.prepayId = prepayId; | |||
| } | |||
| public String getPartnerId() { | |||
| return this.partnerId; | |||
| } | |||
| public void setPartnerId(String partnerId) { | |||
| this.partnerId = partnerId; | |||
| } | |||
| public String getAppId() { | |||
| return this.appId; | |||
| } | |||
| public void setAppId(String appId) { | |||
| this.appId = appId; | |||
| } | |||
| public String getPackageValue() { | |||
| return this.packageValue; | |||
| } | |||
| public void setPackageValue(String packageValue) { | |||
| this.packageValue = packageValue; | |||
| } | |||
| public String getTimeStamp() { | |||
| return this.timeStamp; | |||
| } | |||
| public void setTimeStamp(String timeStamp) { | |||
| this.timeStamp = timeStamp; | |||
| } | |||
| public String getNonceStr() { | |||
| return this.nonceStr; | |||
| } | |||
| public void setNonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| } | |||
| public static final class Builder { | |||
| private String sign; | |||
| private String prepayId; | |||
| private String partnerId; | |||
| private String appId; | |||
| private String packageValue; | |||
| private String timeStamp; | |||
| private String nonceStr; | |||
| private Builder() { | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder prepayId(String prepayId) { | |||
| this.prepayId = prepayId; | |||
| return this; | |||
| } | |||
| public Builder partnerId(String partnerId) { | |||
| this.partnerId = partnerId; | |||
| return this; | |||
| } | |||
| public Builder appId(String appId) { | |||
| this.appId = appId; | |||
| return this; | |||
| } | |||
| public Builder packageValue(String packageValue) { | |||
| this.packageValue = packageValue; | |||
| return this; | |||
| } | |||
| public Builder timeStamp(String timeStamp) { | |||
| this.timeStamp = timeStamp; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public WxPayAppOrderResult build() { | |||
| return new WxPayAppOrderResult(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,5 +1,8 @@ | |||
| package com.github.binarywang.wxpay.bean.order; | |||
| import lombok.Builder; | |||
| import lombok.Data; | |||
| /** | |||
| * <pre> | |||
| * 微信公众号支付进行统一下单后组装所需参数的类 | |||
| @@ -9,6 +12,8 @@ package com.github.binarywang.wxpay.bean.order; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @Builder | |||
| public class WxPayMpOrderResult { | |||
| private String appId; | |||
| private String timeStamp; | |||
| @@ -19,115 +24,4 @@ public class WxPayMpOrderResult { | |||
| private String packageValue; | |||
| private String signType; | |||
| private String paySign; | |||
| private WxPayMpOrderResult(Builder builder) { | |||
| setAppId(builder.appId); | |||
| setTimeStamp(builder.timeStamp); | |||
| setNonceStr(builder.nonceStr); | |||
| setPackageValue(builder.packageValue); | |||
| setSignType(builder.signType); | |||
| setPaySign(builder.paySign); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getAppId() { | |||
| return this.appId; | |||
| } | |||
| public void setAppId(String appId) { | |||
| this.appId = appId; | |||
| } | |||
| public String getTimeStamp() { | |||
| return this.timeStamp; | |||
| } | |||
| public void setTimeStamp(String timeStamp) { | |||
| this.timeStamp = timeStamp; | |||
| } | |||
| public String getNonceStr() { | |||
| return this.nonceStr; | |||
| } | |||
| public void setNonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| } | |||
| public String getPackageValue() { | |||
| return this.packageValue; | |||
| } | |||
| public void setPackageValue(String packageValue) { | |||
| this.packageValue = packageValue; | |||
| } | |||
| public String getSignType() { | |||
| return this.signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| public String getPaySign() { | |||
| return this.paySign; | |||
| } | |||
| public void setPaySign(String paySign) { | |||
| this.paySign = paySign; | |||
| } | |||
| public WxPayMpOrderResult() { | |||
| } | |||
| public static final class Builder { | |||
| private String appId; | |||
| private String timeStamp; | |||
| private String nonceStr; | |||
| private String packageValue; | |||
| private String signType; | |||
| private String paySign; | |||
| private Builder() { | |||
| } | |||
| public Builder appId(String appId) { | |||
| this.appId = appId; | |||
| return this; | |||
| } | |||
| public Builder timeStamp(String timeStamp) { | |||
| this.timeStamp = timeStamp; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder packageValue(String packageValue) { | |||
| this.packageValue = packageValue; | |||
| return this; | |||
| } | |||
| public Builder signType(String signType) { | |||
| this.signType = signType; | |||
| return this; | |||
| } | |||
| public Builder paySign(String paySign) { | |||
| this.paySign = paySign; | |||
| return this; | |||
| } | |||
| public WxPayMpOrderResult build() { | |||
| return new WxPayMpOrderResult(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,5 +1,8 @@ | |||
| package com.github.binarywang.wxpay.bean.order; | |||
| import lombok.Builder; | |||
| import lombok.Data; | |||
| /** | |||
| * <pre> | |||
| * 微信扫码支付统一下单后发起支付拼接所需参数实现类 | |||
| @@ -8,41 +11,8 @@ package com.github.binarywang.wxpay.bean.order; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @Builder | |||
| public class WxPayNativeOrderResult { | |||
| private String codeUrl; | |||
| private WxPayNativeOrderResult(Builder builder) { | |||
| setCodeUrl(builder.codeUrl); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getCodeUrl() { | |||
| return this.codeUrl; | |||
| } | |||
| public void setCodeUrl(String codeUrl) { | |||
| this.codeUrl = codeUrl; | |||
| } | |||
| public WxPayNativeOrderResult() { | |||
| } | |||
| public static final class Builder { | |||
| private String codeUrl; | |||
| private Builder() { | |||
| } | |||
| public Builder codeUrl(String codeUrl) { | |||
| this.codeUrl = codeUrl; | |||
| return this; | |||
| } | |||
| public WxPayNativeOrderResult build() { | |||
| return new WxPayNativeOrderResult(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| @@ -17,8 +18,13 @@ import me.chanjar.weixin.common.util.ToStringUtils; | |||
| * </pre> | |||
| * Created by Binary Wang on 2016/10/19. | |||
| * | |||
| * @author binarywang (https://github.com/binarywang) | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxEntPayQueryRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -35,14 +41,6 @@ public class WxEntPayQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("partner_trade_no") | |||
| private String partnerTradeNo; | |||
| public String getPartnerTradeNo() { | |||
| return this.partnerTradeNo; | |||
| } | |||
| public void setPartnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| @@ -1,6 +1,7 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| @@ -10,8 +11,14 @@ import me.chanjar.weixin.common.util.ToStringUtils; | |||
| * </pre> | |||
| * Created by Binary Wang on 2016/10/02. | |||
| * | |||
| * @author binarywang (https://github.com/binarywang) | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxEntPayRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -153,32 +160,6 @@ public class WxEntPayRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("spbill_create_ip") | |||
| private String spbillCreateIp; | |||
| public WxEntPayRequest() { | |||
| } | |||
| private WxEntPayRequest(Builder builder) { | |||
| setAppid(builder.appid); | |||
| setMchId(builder.mchId); | |||
| setSubAppId(builder.subAppId); | |||
| setSubMchId(builder.subMchId); | |||
| setNonceStr(builder.nonceStr); | |||
| setSign(builder.sign); | |||
| mchAppid = builder.mchAppid; | |||
| setMchId(builder.mchId); | |||
| setDeviceInfo(builder.deviceInfo); | |||
| setPartnerTradeNo(builder.partnerTradeNo); | |||
| setOpenid(builder.openid); | |||
| setCheckName(builder.checkName); | |||
| setReUserName(builder.reUserName); | |||
| setAmount(builder.amount); | |||
| setDescription(builder.description); | |||
| setSpbillCreateIp(builder.spbillCreateIp); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| @@ -204,172 +185,9 @@ public class WxEntPayRequest extends WxPayBaseRequest { | |||
| this.mchId = mchId; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getPartnerTradeNo() { | |||
| return this.partnerTradeNo; | |||
| } | |||
| public void setPartnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getCheckName() { | |||
| return this.checkName; | |||
| } | |||
| public void setCheckName(String checkName) { | |||
| this.checkName = checkName; | |||
| } | |||
| public String getReUserName() { | |||
| return this.reUserName; | |||
| } | |||
| public void setReUserName(String reUserName) { | |||
| this.reUserName = reUserName; | |||
| } | |||
| public Integer getAmount() { | |||
| return this.amount; | |||
| } | |||
| public void setAmount(Integer amount) { | |||
| this.amount = amount; | |||
| } | |||
| public String getDescription() { | |||
| return this.description; | |||
| } | |||
| public void setDescription(String description) { | |||
| this.description = description; | |||
| } | |||
| public String getSpbillCreateIp() { | |||
| return this.spbillCreateIp; | |||
| } | |||
| public void setSpbillCreateIp(String spbillCreateIp) { | |||
| this.spbillCreateIp = spbillCreateIp; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return ToStringUtils.toSimpleString(this); | |||
| } | |||
| public static final class Builder { | |||
| private String appid; | |||
| private String mchId; | |||
| private String deviceInfo; | |||
| private String partnerTradeNo; | |||
| private String openid; | |||
| private String checkName; | |||
| private String reUserName; | |||
| private Integer amount; | |||
| private String description; | |||
| private String spbillCreateIp; | |||
| private String subAppId; | |||
| private String subMchId; | |||
| private String nonceStr; | |||
| private String sign; | |||
| private String mchAppid; | |||
| private Builder() { | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder deviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| return this; | |||
| } | |||
| public Builder partnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| return this; | |||
| } | |||
| public Builder openid(String openid) { | |||
| this.openid = openid; | |||
| return this; | |||
| } | |||
| public Builder checkName(String checkName) { | |||
| this.checkName = checkName; | |||
| return this; | |||
| } | |||
| public Builder reUserName(String reUserName) { | |||
| this.reUserName = reUserName; | |||
| return this; | |||
| } | |||
| public Builder amount(Integer amount) { | |||
| this.amount = amount; | |||
| return this; | |||
| } | |||
| public Builder description(String description) { | |||
| this.description = description; | |||
| return this; | |||
| } | |||
| public Builder spbillCreateIp(String spbillCreateIp) { | |||
| this.spbillCreateIp = spbillCreateIp; | |||
| return this; | |||
| } | |||
| public WxEntPayRequest build() { | |||
| return new WxEntPayRequest(this); | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder mchAppid(String mchAppid) { | |||
| this.mchAppid = mchAppid; | |||
| return this; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| /** | |||
| * <pre> | |||
| * 授权码查询openid接口请求对象类 | |||
| * Created by Binary Wang on 2017-3-27. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayAuthcode2OpenidRequest extends WxPayBaseRequest { | |||
| @@ -24,21 +31,6 @@ public class WxPayAuthcode2OpenidRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("auth_code") | |||
| private String authCode; | |||
| public WxPayAuthcode2OpenidRequest() { | |||
| } | |||
| public WxPayAuthcode2OpenidRequest(String authCode) { | |||
| this.authCode = authCode; | |||
| } | |||
| public String getAuthCode() { | |||
| return this.authCode; | |||
| } | |||
| public void setAuthCode(String authCode) { | |||
| this.authCode = authCode; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| // nothing to do | |||
| @@ -5,6 +5,7 @@ import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.github.binarywang.wxpay.util.SignUtils; | |||
| import com.thoughtworks.xstream.XStream; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import me.chanjar.weixin.common.exception.WxErrorException; | |||
| import me.chanjar.weixin.common.util.BeanUtils; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| @@ -19,8 +20,9 @@ import java.math.BigDecimal; | |||
| * 微信支付请求对象共用的参数存放类 | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| public abstract class WxPayBaseRequest { | |||
| /** | |||
| * <pre> | |||
| @@ -120,7 +122,7 @@ public abstract class WxPayBaseRequest { | |||
| /** | |||
| * 检查请求参数内容,包括必填参数以及特殊约束 | |||
| */ | |||
| protected void checkFields() throws WxPayException { | |||
| private void checkFields() throws WxPayException { | |||
| //check required fields | |||
| try { | |||
| BeanUtils.checkRequiredFields(this); | |||
| @@ -137,10 +139,6 @@ public abstract class WxPayBaseRequest { | |||
| */ | |||
| protected abstract void checkConstraints() throws WxPayException; | |||
| public String getAppid() { | |||
| return this.appid; | |||
| } | |||
| /** | |||
| * 如果配置中已经设置,可以不设置值 | |||
| * | |||
| @@ -150,10 +148,6 @@ public abstract class WxPayBaseRequest { | |||
| this.appid = appid; | |||
| } | |||
| public String getMchId() { | |||
| return this.mchId; | |||
| } | |||
| /** | |||
| * 如果配置中已经设置,可以不设置值 | |||
| * | |||
| @@ -163,10 +157,6 @@ public abstract class WxPayBaseRequest { | |||
| this.mchId = mchId; | |||
| } | |||
| public String getNonceStr() { | |||
| return this.nonceStr; | |||
| } | |||
| /** | |||
| * 默认采用时间戳为随机字符串,可以不设置 | |||
| * | |||
| @@ -176,38 +166,6 @@ public abstract class WxPayBaseRequest { | |||
| this.nonceStr = nonceStr; | |||
| } | |||
| public String getSign() { | |||
| return this.sign; | |||
| } | |||
| public void setSign(String sign) { | |||
| this.sign = sign; | |||
| } | |||
| public String getSubAppId() { | |||
| return subAppId; | |||
| } | |||
| public void setSubAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| } | |||
| public String getSubMchId() { | |||
| return subMchId; | |||
| } | |||
| public void setSubMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| } | |||
| public String getSignType() { | |||
| return signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return ToStringUtils.toSimpleString(this); | |||
| @@ -3,6 +3,7 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.constant.WxPayConstants.BillType; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| import org.apache.commons.lang3.ArrayUtils; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -13,9 +14,15 @@ import java.util.Arrays; | |||
| * <pre> | |||
| * 微信支付下载对账单请求参数类 | |||
| * Created by Binary Wang on 2017-01-11. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayDownloadBillRequest extends WxPayBaseRequest { | |||
| private static final String[] BILL_TYPES = new String[]{BillType.ALL, BillType.SUCCESS, BillType.REFUND, BillType.RECHARGE_REFUND}; | |||
| @@ -34,19 +41,6 @@ public class WxPayDownloadBillRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("device_info") | |||
| private String deviceInfo; | |||
| /** | |||
| * <pre> | |||
| * 签名类型 | |||
| * sign_type | |||
| * 否 | |||
| * String(32) | |||
| * HMAC-SHA256 | |||
| * 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5 | |||
| * </pre> | |||
| */ | |||
| @XStreamAlias("sign_type") | |||
| private String signType; | |||
| /** | |||
| * <pre> | |||
| * 账单类型 | |||
| @@ -90,46 +84,6 @@ public class WxPayDownloadBillRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("tar_type") | |||
| private String tarType; | |||
| public String getDeviceInfo() { | |||
| return deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getSignType() { | |||
| return signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| public String getBillType() { | |||
| return billType; | |||
| } | |||
| public void setBillType(String billType) { | |||
| this.billType = billType; | |||
| } | |||
| public String getBillDate() { | |||
| return billDate; | |||
| } | |||
| public void setBillDate(String billDate) { | |||
| this.billDate = billDate; | |||
| } | |||
| public String getTarType() { | |||
| return tarType; | |||
| } | |||
| public void setTarType(String tarType) { | |||
| this.tarType = tarType; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() throws WxPayException { | |||
| if (StringUtils.isNotBlank(this.getTarType()) && !TAR_TYPE_GZIP.equals(this.getTarType())) { | |||
| @@ -1,29 +1,24 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| /** | |||
| * <pre> | |||
| * 提交刷卡支付请求对象类 | |||
| * Created by Binary Wang on 2017-3-23. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayMicropayRequest extends WxPayBaseRequest { | |||
| /** | |||
| * <pre> | |||
| * 签名类型 | |||
| * sign_type | |||
| * 否 | |||
| * String(32) | |||
| * HMAC-SHA256 | |||
| * 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5 | |||
| **/ | |||
| @XStreamAlias("sign_type") | |||
| private String signType; | |||
| /** | |||
| * <pre> | |||
| * 商品描述 | |||
| @@ -149,232 +144,9 @@ public class WxPayMicropayRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("auth_code") | |||
| private String authCode; | |||
| private WxPayMicropayRequest(Builder builder) { | |||
| setSignType(builder.signType); | |||
| setBody(builder.body); | |||
| setAppid(builder.appid); | |||
| setDetail(builder.detail); | |||
| setMchId(builder.mchId); | |||
| setAttach(builder.attach); | |||
| setSubAppId(builder.subAppId); | |||
| setOutTradeNo(builder.outTradeNo); | |||
| setSubMchId(builder.subMchId); | |||
| setTotalFee(builder.totalFee); | |||
| setNonceStr(builder.nonceStr); | |||
| setFeeType(builder.feeType); | |||
| setSign(builder.sign); | |||
| setSpbillCreateIp(builder.spbillCreateIp); | |||
| setGoodsTag(builder.goodsTag); | |||
| setLimitPay(builder.limitPay); | |||
| setAuthCode(builder.authCode); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getSignType() { | |||
| return this.signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| public String getBody() { | |||
| return this.body; | |||
| } | |||
| public void setBody(String body) { | |||
| this.body = body; | |||
| } | |||
| public String getDetail() { | |||
| return this.detail; | |||
| } | |||
| public void setDetail(String detail) { | |||
| this.detail = detail; | |||
| } | |||
| public String getAttach() { | |||
| return this.attach; | |||
| } | |||
| public void setAttach(String attach) { | |||
| this.attach = attach; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return this.totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public String getFeeType() { | |||
| return this.feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public String getSpbillCreateIp() { | |||
| return this.spbillCreateIp; | |||
| } | |||
| public void setSpbillCreateIp(String spbillCreateIp) { | |||
| this.spbillCreateIp = spbillCreateIp; | |||
| } | |||
| public String getGoodsTag() { | |||
| return this.goodsTag; | |||
| } | |||
| public void setGoodsTag(String goodsTag) { | |||
| this.goodsTag = goodsTag; | |||
| } | |||
| public String getLimitPay() { | |||
| return this.limitPay; | |||
| } | |||
| public void setLimitPay(String limitPay) { | |||
| this.limitPay = limitPay; | |||
| } | |||
| public String getAuthCode() { | |||
| return this.authCode; | |||
| } | |||
| public void setAuthCode(String authCode) { | |||
| this.authCode = authCode; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| } | |||
| public static final class Builder { | |||
| private String signType; | |||
| private String body; | |||
| private String appid; | |||
| private String detail; | |||
| private String mchId; | |||
| private String attach; | |||
| private String subAppId; | |||
| private String outTradeNo; | |||
| private String subMchId; | |||
| private Integer totalFee; | |||
| private String nonceStr; | |||
| private String feeType; | |||
| private String sign; | |||
| private String spbillCreateIp; | |||
| private String goodsTag; | |||
| private String limitPay; | |||
| private String authCode; | |||
| private Builder() { | |||
| } | |||
| public Builder signType(String signType) { | |||
| this.signType = signType; | |||
| return this; | |||
| } | |||
| public Builder body(String body) { | |||
| this.body = body; | |||
| return this; | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder detail(String detail) { | |||
| this.detail = detail; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder attach(String attach) { | |||
| this.attach = attach; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder outTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder totalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder feeType(String feeType) { | |||
| this.feeType = feeType; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder spbillCreateIp(String spbillCreateIp) { | |||
| this.spbillCreateIp = spbillCreateIp; | |||
| return this; | |||
| } | |||
| public Builder goodsTag(String goodsTag) { | |||
| this.goodsTag = goodsTag; | |||
| return this; | |||
| } | |||
| public Builder limitPay(String limitPay) { | |||
| this.limitPay = limitPay; | |||
| return this; | |||
| } | |||
| public Builder authCode(String authCode) { | |||
| this.authCode = authCode; | |||
| return this; | |||
| } | |||
| public WxPayMicropayRequest build() { | |||
| return new WxPayMicropayRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| /** | |||
| * <pre> | |||
| * 关闭订单请求对象类 | |||
| * Created by Binary Wang on 2016-10-27. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderCloseRequest extends WxPayBaseRequest { | |||
| @@ -25,14 +32,6 @@ public class WxPayOrderCloseRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("out_trade_no") | |||
| private String outTradeNo; | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| @@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| /** | |||
| @@ -17,8 +18,13 @@ import org.apache.commons.lang3.StringUtils; | |||
| * <li>描述 | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderQueryRequest extends WxPayBaseRequest { | |||
| @@ -48,22 +54,6 @@ public class WxPayOrderQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("out_trade_no") | |||
| private String outTradeNo; | |||
| public String getTransactionId() { | |||
| return this.transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() throws WxPayException { | |||
| if ((StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo)) || | |||
| @@ -2,15 +2,22 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| /** | |||
| * <pre> | |||
| * 撤销订单请求类 | |||
| * Created by Binary Wang on 2017-3-23. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderReverseRequest extends WxPayBaseRequest { | |||
| @@ -39,58 +46,6 @@ public class WxPayOrderReverseRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("out_trade_no") | |||
| private String outTradeNo; | |||
| /** | |||
| * <pre> | |||
| * 签名类型 | |||
| * sign_type | |||
| * 否 | |||
| * String(32) | |||
| * HMAC-SHA256 | |||
| * 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5 | |||
| **/ | |||
| @XStreamAlias("sign_type") | |||
| private String signType; | |||
| private WxPayOrderReverseRequest(Builder builder) { | |||
| setTransactionId(builder.transactionId); | |||
| setAppid(builder.appid); | |||
| setOutTradeNo(builder.outTradeNo); | |||
| setMchId(builder.mchId); | |||
| setSignType(builder.signType); | |||
| setSubAppId(builder.subAppId); | |||
| setSubMchId(builder.subMchId); | |||
| setNonceStr(builder.nonceStr); | |||
| setSign(builder.sign); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getTransactionId() { | |||
| return this.transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getSignType() { | |||
| return this.signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() throws WxPayException { | |||
| if (StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo)) { | |||
| @@ -98,67 +53,4 @@ public class WxPayOrderReverseRequest extends WxPayBaseRequest { | |||
| } | |||
| } | |||
| public static final class Builder { | |||
| private String transactionId; | |||
| private String appid; | |||
| private String outTradeNo; | |||
| private String mchId; | |||
| private String signType; | |||
| private String subAppId; | |||
| private String subMchId; | |||
| private String nonceStr; | |||
| private String sign; | |||
| private Builder() { | |||
| } | |||
| public Builder transactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| return this; | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder outTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder signType(String signType) { | |||
| this.signType = signType; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public WxPayOrderReverseRequest build() { | |||
| return new WxPayOrderReverseRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| /** | |||
| @@ -12,6 +13,11 @@ import me.chanjar.weixin.common.annotation.Required; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayQueryCommentRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -77,36 +83,4 @@ public class WxPayQueryCommentRequest extends WxPayBaseRequest { | |||
| } | |||
| public String getBeginTime() { | |||
| return beginTime; | |||
| } | |||
| public void setBeginTime(String beginTime) { | |||
| this.beginTime = beginTime; | |||
| } | |||
| public String getEndTime() { | |||
| return endTime; | |||
| } | |||
| public void setEndTime(String endTime) { | |||
| this.endTime = endTime; | |||
| } | |||
| public Integer getOffset() { | |||
| return offset; | |||
| } | |||
| public void setOffset(Integer offset) { | |||
| this.offset = offset; | |||
| } | |||
| public Integer getLimit() { | |||
| return limit; | |||
| } | |||
| public void setLimit(Integer limit) { | |||
| this.limit = limit; | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| /** | |||
| * <pre> | |||
| @@ -12,9 +13,15 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * 类型 | |||
| * 说明 | |||
| * Created by Binary Wang on 2016-11-28. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRedpackQueryRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -39,22 +46,6 @@ public class WxPayRedpackQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("bill_type") | |||
| private String billType; | |||
| public String getBillType() { | |||
| return billType; | |||
| } | |||
| public void setBillType(String billType) { | |||
| this.billType = billType; | |||
| } | |||
| public String getMchBillNo() { | |||
| return mchBillNo; | |||
| } | |||
| public void setMchBillNo(String mchBillNo) { | |||
| this.mchBillNo = mchBillNo; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| @@ -2,14 +2,21 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| /** | |||
| * <pre> | |||
| * Created by Binary Wang on 2016-11-24. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRefundQueryRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -25,19 +32,6 @@ public class WxPayRefundQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("device_info") | |||
| private String deviceInfo; | |||
| /** | |||
| * <pre> | |||
| * 签名类型 | |||
| * sign_type | |||
| * 否 | |||
| * String(32) | |||
| * HMAC-SHA256 | |||
| * 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5 | |||
| * </pre> | |||
| */ | |||
| @XStreamAlias("sign_type") | |||
| private String signType; | |||
| //************以下四选一************ | |||
| /** | |||
| * <pre> | |||
| @@ -87,54 +81,6 @@ public class WxPayRefundQueryRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("refund_id") | |||
| private String refundId; | |||
| public String getDeviceInfo() { | |||
| return deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getSignType() { | |||
| return signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| public String getTransactionId() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getOutRefundNo() { | |||
| return outRefundNo; | |||
| } | |||
| public void setOutRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| } | |||
| public String getRefundId() { | |||
| return refundId; | |||
| } | |||
| public void setRefundId(String refundId) { | |||
| this.refundId = refundId; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() throws WxPayException { | |||
| if ((StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo) | |||
| @@ -3,6 +3,7 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.config.WxPayConfig; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| import org.apache.commons.lang3.ArrayUtils; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -22,8 +23,13 @@ import java.util.Arrays; | |||
| * Created by Binary Wang on 2016-10-08. | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRefundRequest extends WxPayBaseRequest { | |||
| private static final String[] REFUND_ACCOUNT = new String[]{"REFUND_SOURCE_RECHARGE_FUNDS", | |||
| @@ -155,112 +161,6 @@ public class WxPayRefundRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("refund_desc") | |||
| private String refundDesc; | |||
| private WxPayRefundRequest(Builder builder) { | |||
| setDeviceInfo(builder.deviceInfo); | |||
| setAppid(builder.appid); | |||
| setTransactionId(builder.transactionId); | |||
| setMchId(builder.mchId); | |||
| setSubAppId(builder.subAppId); | |||
| setOutTradeNo(builder.outTradeNo); | |||
| setSubMchId(builder.subMchId); | |||
| setOutRefundNo(builder.outRefundNo); | |||
| setNonceStr(builder.nonceStr); | |||
| setTotalFee(builder.totalFee); | |||
| setSign(builder.sign); | |||
| setRefundFee(builder.refundFee); | |||
| setRefundFeeType(builder.refundFeeType); | |||
| setOpUserId(builder.opUserId); | |||
| setRefundAccount(builder.refundAccount); | |||
| setRefundDesc(builder.refundDesc); | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getTransactionId() { | |||
| return this.transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getOutRefundNo() { | |||
| return this.outRefundNo; | |||
| } | |||
| public void setOutRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return this.totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public Integer getRefundFee() { | |||
| return this.refundFee; | |||
| } | |||
| public void setRefundFee(Integer refundFee) { | |||
| this.refundFee = refundFee; | |||
| } | |||
| public String getRefundFeeType() { | |||
| return this.refundFeeType; | |||
| } | |||
| public void setRefundFeeType(String refundFeeType) { | |||
| this.refundFeeType = refundFeeType; | |||
| } | |||
| public String getOpUserId() { | |||
| return this.opUserId; | |||
| } | |||
| public void setOpUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| } | |||
| public String getRefundAccount() { | |||
| return this.refundAccount; | |||
| } | |||
| public void setRefundAccount(String refundAccount) { | |||
| this.refundAccount = refundAccount; | |||
| } | |||
| public String getRefundDesc() { | |||
| return this.refundDesc; | |||
| } | |||
| public void setRefundDesc(String refundDesc) { | |||
| this.refundDesc = refundDesc; | |||
| } | |||
| public WxPayRefundRequest() { | |||
| } | |||
| @Override | |||
| public void checkAndSign(WxPayConfig config) throws WxPayException { | |||
| if (StringUtils.isBlank(this.getOpUserId())) { | |||
| @@ -284,109 +184,4 @@ public class WxPayRefundRequest extends WxPayBaseRequest { | |||
| } | |||
| } | |||
| public static final class Builder { | |||
| private String deviceInfo; | |||
| private String appid; | |||
| private String transactionId; | |||
| private String mchId; | |||
| private String subAppId; | |||
| private String outTradeNo; | |||
| private String subMchId; | |||
| private String outRefundNo; | |||
| private String nonceStr; | |||
| private Integer totalFee; | |||
| private String sign; | |||
| private Integer refundFee; | |||
| private String refundFeeType; | |||
| private String opUserId; | |||
| private String refundAccount; | |||
| private String refundDesc; | |||
| private Builder() { | |||
| } | |||
| public Builder deviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| return this; | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder transactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder outTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder outRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder totalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder refundFee(Integer refundFee) { | |||
| this.refundFee = refundFee; | |||
| return this; | |||
| } | |||
| public Builder refundFeeType(String refundFeeType) { | |||
| this.refundFeeType = refundFeeType; | |||
| return this; | |||
| } | |||
| public Builder opUserId(String opUserId) { | |||
| this.opUserId = opUserId; | |||
| return this; | |||
| } | |||
| public Builder refundAccount(String refundAccount) { | |||
| this.refundAccount = refundAccount; | |||
| return this; | |||
| } | |||
| public Builder refundDesc(String refundDesc) { | |||
| this.refundDesc = refundDesc; | |||
| return this; | |||
| } | |||
| public WxPayRefundRequest build() { | |||
| return new WxPayRefundRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| /** | |||
| @@ -15,8 +16,13 @@ import me.chanjar.weixin.common.annotation.Required; | |||
| * <li>描述 | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayReportRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -32,19 +38,6 @@ public class WxPayReportRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("device_info") | |||
| private String deviceInfo; | |||
| /** | |||
| * <pre> | |||
| * 签名类型 | |||
| * sign_type | |||
| * 否 | |||
| * String(32) | |||
| * HMAC-SHA256 | |||
| * 签名类型,目前支持HMAC-SHA256和MD5,默认为MD5 | |||
| * </pre> | |||
| */ | |||
| @XStreamAlias("sign_type") | |||
| private String signType; | |||
| /** | |||
| * <pre> | |||
| * 接口URL | |||
| @@ -175,102 +168,6 @@ public class WxPayReportRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("time") | |||
| private String time; | |||
| public String getDeviceInfo() { | |||
| return deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getSignType() { | |||
| return signType; | |||
| } | |||
| public void setSignType(String signType) { | |||
| this.signType = signType; | |||
| } | |||
| public String getInterfaceUrl() { | |||
| return interfaceUrl; | |||
| } | |||
| public void setInterfaceUrl(String interfaceUrl) { | |||
| this.interfaceUrl = interfaceUrl; | |||
| } | |||
| public Integer getExecuteTime() { | |||
| return executeTime; | |||
| } | |||
| public void setExecuteTime(Integer executeTime) { | |||
| this.executeTime = executeTime; | |||
| } | |||
| public String getReturnCode() { | |||
| return returnCode; | |||
| } | |||
| public void setReturnCode(String returnCode) { | |||
| this.returnCode = returnCode; | |||
| } | |||
| public String getReturnMsg() { | |||
| return returnMsg; | |||
| } | |||
| public void setReturnMsg(String returnMsg) { | |||
| this.returnMsg = returnMsg; | |||
| } | |||
| public String getResultCode() { | |||
| return resultCode; | |||
| } | |||
| public void setResultCode(String resultCode) { | |||
| this.resultCode = resultCode; | |||
| } | |||
| public String getErrCode() { | |||
| return errCode; | |||
| } | |||
| public void setErrCode(String errCode) { | |||
| this.errCode = errCode; | |||
| } | |||
| public String getErrCodeDes() { | |||
| return errCodeDes; | |||
| } | |||
| public void setErrCodeDes(String errCodeDes) { | |||
| this.errCodeDes = errCodeDes; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getUserIp() { | |||
| return userIp; | |||
| } | |||
| public void setUserIp(String userIp) { | |||
| this.userIp = userIp; | |||
| } | |||
| public String getTime() { | |||
| return time; | |||
| } | |||
| public void setTime(String time) { | |||
| this.time = time; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| @@ -1,13 +1,19 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| /** | |||
| * 发送红包请求参数对象 | |||
| * Created by Binary Wang on 2016/9/24. | |||
| * | |||
| * @author binarywang (https://github.com/binarywang) | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPaySendRedpackRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -137,85 +143,6 @@ public class WxPaySendRedpackRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("consume_mch_id") | |||
| private String consumeMchId; | |||
| public String getMchBillNo() { | |||
| return mchBillNo; | |||
| } | |||
| public void setMchBillNo(String mchBillNo) { | |||
| this.mchBillNo = mchBillNo; | |||
| } | |||
| public String getSendName() { | |||
| return this.sendName; | |||
| } | |||
| public void setSendName(String sendName) { | |||
| this.sendName = sendName; | |||
| } | |||
| public String getReOpenid() { | |||
| return this.reOpenid; | |||
| } | |||
| public void setReOpenid(String reOpenid) { | |||
| this.reOpenid = reOpenid; | |||
| } | |||
| public Integer getTotalAmount() { | |||
| return this.totalAmount; | |||
| } | |||
| public void setTotalAmount(Integer totalAmount) { | |||
| this.totalAmount = totalAmount; | |||
| } | |||
| public Integer getTotalNum() { | |||
| return this.totalNum; | |||
| } | |||
| public void setTotalNum(Integer totalNum) { | |||
| this.totalNum = totalNum; | |||
| } | |||
| public String getAmtType() { | |||
| return this.amtType; | |||
| } | |||
| public void setAmtType(String amtType) { | |||
| this.amtType = amtType; | |||
| } | |||
| public String getWishing() { | |||
| return this.wishing; | |||
| } | |||
| public void setWishing(String wishing) { | |||
| this.wishing = wishing; | |||
| } | |||
| public String getClientIp() { | |||
| return this.clientIp; | |||
| } | |||
| public void setClientIp(String clientIp) { | |||
| this.clientIp = clientIp; | |||
| } | |||
| public String getActName() { | |||
| return this.actName; | |||
| } | |||
| public void setActName(String actName) { | |||
| this.actName = actName; | |||
| } | |||
| public String getRemark() { | |||
| return this.remark; | |||
| } | |||
| public void setRemark(String remark) { | |||
| this.remark = remark; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| @@ -232,28 +159,4 @@ public class WxPaySendRedpackRequest extends WxPayBaseRequest { | |||
| this.wxAppid = appid; | |||
| } | |||
| public String getSceneId() { | |||
| return this.sceneId; | |||
| } | |||
| public void setSceneId(String sceneId) { | |||
| this.sceneId = sceneId; | |||
| } | |||
| public String getRiskInfo() { | |||
| return this.riskInfo; | |||
| } | |||
| public void setRiskInfo(String riskInfo) { | |||
| this.riskInfo = riskInfo; | |||
| } | |||
| public String getConsumeMchId() { | |||
| return this.consumeMchId; | |||
| } | |||
| public void setConsumeMchId(String consumeMchId) { | |||
| this.consumeMchId = consumeMchId; | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.request; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| /** | |||
| * <pre> | |||
| * 转换短链接请求对象类 | |||
| * Created by Binary Wang on 2017-3-27. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayShorturlRequest extends WxPayBaseRequest { | |||
| /** | |||
| @@ -24,21 +31,6 @@ public class WxPayShorturlRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("long_url") | |||
| private String longUrl; | |||
| public WxPayShorturlRequest() { | |||
| } | |||
| public WxPayShorturlRequest(String longUrl) { | |||
| this.longUrl = longUrl; | |||
| } | |||
| public String getLongUrl() { | |||
| return this.longUrl; | |||
| } | |||
| public void setLongUrl(String longUrl) { | |||
| this.longUrl = longUrl; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() { | |||
| //do nothing | |||
| @@ -3,6 +3,7 @@ package com.github.binarywang.wxpay.bean.request; | |||
| import com.github.binarywang.wxpay.config.WxPayConfig; | |||
| import com.github.binarywang.wxpay.exception.WxPayException; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import me.chanjar.weixin.common.annotation.Required; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -10,11 +11,16 @@ import org.apache.commons.lang3.StringUtils; | |||
| * <pre> | |||
| * 统一下单请求参数对象 | |||
| * 参考文档:https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1 | |||
| * </pre> | |||
| * Created by Binary Wang on 2016/9/25. | |||
| * </pre> | |||
| * | |||
| * @author binarywang (https://github.com/binarywang) | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayUnifiedOrderRequest extends WxPayBaseRequest { | |||
| private static final String[] TRADE_TYPES = new String[]{"JSAPI", "NATIVE", "APP", "MWEB"}; | |||
| @@ -310,146 +316,13 @@ public class WxPayUnifiedOrderRequest extends WxPayBaseRequest { | |||
| @XStreamAlias("fingerprint") | |||
| private String fingerprint; | |||
| public WxPayUnifiedOrderRequest() { | |||
| } | |||
| private WxPayUnifiedOrderRequest(Builder builder) { | |||
| setDeviceInfo(builder.deviceInfo); | |||
| setAppid(builder.appid); | |||
| setBody(builder.body); | |||
| setMchId(builder.mchId); | |||
| setSubAppId(builder.subAppId); | |||
| setSubMchId(builder.subMchId); | |||
| setNonceStr(builder.nonceStr); | |||
| setSign(builder.sign); | |||
| setDetail(builder.detail); | |||
| setAttach(builder.attach); | |||
| setOutTradeNo(builder.outTradeNo); | |||
| setFeeType(builder.feeType); | |||
| setTotalFee(builder.totalFee); | |||
| setSpbillCreateIp(builder.spbillCreateIp); | |||
| setTimeStart(builder.timeStart); | |||
| setTimeExpire(builder.timeExpire); | |||
| setGoodsTag(builder.goodsTag); | |||
| setNotifyURL(builder.notifyURL); | |||
| setTradeType(builder.tradeType); | |||
| setProductId(builder.productId); | |||
| setLimitPay(builder.limitPay); | |||
| setOpenid(builder.openid); | |||
| setSubOpenid(builder.subOpenid); | |||
| setSceneInfo(builder.sceneInfo); | |||
| fingerprint = builder.fingerprint; | |||
| } | |||
| public static Builder newBuilder() { | |||
| return new Builder(); | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getBody() { | |||
| return this.body; | |||
| } | |||
| public void setBody(String body) { | |||
| this.body = body; | |||
| } | |||
| public String getDetail() { | |||
| return this.detail; | |||
| } | |||
| public void setDetail(String detail) { | |||
| this.detail = detail; | |||
| } | |||
| public String getAttach() { | |||
| return this.attach; | |||
| } | |||
| public void setAttach(String attach) { | |||
| this.attach = attach; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getFeeType() { | |||
| return this.feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return this.totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public String getSpbillCreateIp() { | |||
| return this.spbillCreateIp; | |||
| } | |||
| public void setSpbillCreateIp(String spbillCreateIp) { | |||
| this.spbillCreateIp = spbillCreateIp; | |||
| } | |||
| public String getTimeStart() { | |||
| return this.timeStart; | |||
| } | |||
| public void setTimeStart(String timeStart) { | |||
| this.timeStart = timeStart; | |||
| } | |||
| public String getTimeExpire() { | |||
| return this.timeExpire; | |||
| } | |||
| public void setTimeExpire(String timeExpire) { | |||
| this.timeExpire = timeExpire; | |||
| } | |||
| public String getGoodsTag() { | |||
| return this.goodsTag; | |||
| } | |||
| public void setGoodsTag(String goodsTag) { | |||
| this.goodsTag = goodsTag; | |||
| } | |||
| public String getNotifyURL() { | |||
| return this.notifyURL; | |||
| } | |||
| /** | |||
| * 如果配置中已经设置,可以不设置值 | |||
| * | |||
| * @param notifyURL | |||
| */ | |||
| public void setNotifyURL(String notifyURL) { | |||
| this.notifyURL = notifyURL; | |||
| } | |||
| public String getTradeType() { | |||
| return this.tradeType; | |||
| } | |||
| /** | |||
| * 如果配置中已经设置,可以不设置值 | |||
| * | |||
| @@ -459,46 +332,6 @@ public class WxPayUnifiedOrderRequest extends WxPayBaseRequest { | |||
| this.tradeType = tradeType; | |||
| } | |||
| public String getProductId() { | |||
| return this.productId; | |||
| } | |||
| public void setProductId(String productId) { | |||
| this.productId = productId; | |||
| } | |||
| public String getLimitPay() { | |||
| return this.limitPay; | |||
| } | |||
| public void setLimitPay(String limitPay) { | |||
| this.limitPay = limitPay; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getSubOpenid() { | |||
| return this.subOpenid; | |||
| } | |||
| public void setSubOpenid(String subOpenid) { | |||
| this.subOpenid = subOpenid; | |||
| } | |||
| public String getSceneInfo() { | |||
| return this.sceneInfo; | |||
| } | |||
| public void setSceneInfo(String sceneInfo) { | |||
| this.sceneInfo = sceneInfo; | |||
| } | |||
| @Override | |||
| protected void checkConstraints() throws WxPayException { | |||
| // if (!ArrayUtils.contains(TRADE_TYPES, this.getTradeType())) { | |||
| @@ -528,163 +361,4 @@ public class WxPayUnifiedOrderRequest extends WxPayBaseRequest { | |||
| super.checkAndSign(config); | |||
| } | |||
| public static final class Builder { | |||
| private String appid; | |||
| private String mchId; | |||
| private String subAppId; | |||
| private String subMchId; | |||
| private String nonceStr; | |||
| private String sign; | |||
| private String deviceInfo; | |||
| private String body; | |||
| private String detail; | |||
| private String attach; | |||
| private String outTradeNo; | |||
| private String feeType; | |||
| private Integer totalFee; | |||
| private String spbillCreateIp; | |||
| private String timeStart; | |||
| private String timeExpire; | |||
| private String goodsTag; | |||
| private String notifyURL; | |||
| private String tradeType; | |||
| private String productId; | |||
| private String limitPay; | |||
| private String openid; | |||
| private String subOpenid; | |||
| private String sceneInfo; | |||
| private String fingerprint; | |||
| private Builder() { | |||
| } | |||
| public Builder appid(String appid) { | |||
| this.appid = appid; | |||
| return this; | |||
| } | |||
| public Builder mchId(String mchId) { | |||
| this.mchId = mchId; | |||
| return this; | |||
| } | |||
| public Builder subAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| return this; | |||
| } | |||
| public Builder subMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| return this; | |||
| } | |||
| public Builder nonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| return this; | |||
| } | |||
| public Builder sign(String sign) { | |||
| this.sign = sign; | |||
| return this; | |||
| } | |||
| public Builder deviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| return this; | |||
| } | |||
| public Builder body(String body) { | |||
| this.body = body; | |||
| return this; | |||
| } | |||
| public Builder detail(String detail) { | |||
| this.detail = detail; | |||
| return this; | |||
| } | |||
| public Builder attach(String attach) { | |||
| this.attach = attach; | |||
| return this; | |||
| } | |||
| public Builder outTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| return this; | |||
| } | |||
| public Builder feeType(String feeType) { | |||
| this.feeType = feeType; | |||
| return this; | |||
| } | |||
| public Builder totalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| return this; | |||
| } | |||
| public Builder spbillCreateIp(String spbillCreateIp) { | |||
| this.spbillCreateIp = spbillCreateIp; | |||
| return this; | |||
| } | |||
| public Builder timeStart(String timeStart) { | |||
| this.timeStart = timeStart; | |||
| return this; | |||
| } | |||
| public Builder timeExpire(String timeExpire) { | |||
| this.timeExpire = timeExpire; | |||
| return this; | |||
| } | |||
| public Builder goodsTag(String goodsTag) { | |||
| this.goodsTag = goodsTag; | |||
| return this; | |||
| } | |||
| public Builder notifyURL(String notifyURL) { | |||
| this.notifyURL = notifyURL; | |||
| return this; | |||
| } | |||
| public Builder tradeType(String tradeType) { | |||
| this.tradeType = tradeType; | |||
| return this; | |||
| } | |||
| public Builder productId(String productId) { | |||
| this.productId = productId; | |||
| return this; | |||
| } | |||
| public Builder limitPay(String limitPay) { | |||
| this.limitPay = limitPay; | |||
| return this; | |||
| } | |||
| public Builder openid(String openid) { | |||
| this.openid = openid; | |||
| return this; | |||
| } | |||
| public Builder subOpenid(String subOpenid) { | |||
| this.subOpenid = subOpenid; | |||
| return this; | |||
| } | |||
| public Builder sceneInfo(String sceneInfo) { | |||
| this.sceneInfo = sceneInfo; | |||
| return this; | |||
| } | |||
| public Builder fingerprint(String fingerprint) { | |||
| this.fingerprint = fingerprint; | |||
| return this; | |||
| } | |||
| public WxPayUnifiedOrderRequest build() { | |||
| return new WxPayUnifiedOrderRequest(this); | |||
| } | |||
| } | |||
| } | |||
| @@ -1,13 +1,19 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * 企业付款查询返回结果 | |||
| * Created by Binary Wang on 2016/10/19. | |||
| * | |||
| * @author binarywang (https://github.com/binarywang) | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxEntPayQueryResult extends WxPayBaseResult { | |||
| @@ -65,75 +71,4 @@ public class WxEntPayQueryResult extends WxPayBaseResult { | |||
| @XStreamAlias("desc") | |||
| private String desc; | |||
| public String getPartnerTradeNo() { | |||
| return this.partnerTradeNo; | |||
| } | |||
| public void setPartnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| } | |||
| public String getDetailId() { | |||
| return this.detailId; | |||
| } | |||
| public void setDetailId(String detailId) { | |||
| this.detailId = detailId; | |||
| } | |||
| public String getStatus() { | |||
| return this.status; | |||
| } | |||
| public void setStatus(String status) { | |||
| this.status = status; | |||
| } | |||
| public String getReason() { | |||
| return this.reason; | |||
| } | |||
| public void setReason(String reason) { | |||
| this.reason = reason; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getTransferName() { | |||
| return this.transferName; | |||
| } | |||
| public void setTransferName(String transferName) { | |||
| this.transferName = transferName; | |||
| } | |||
| public Integer getPaymentAmount() { | |||
| return this.paymentAmount; | |||
| } | |||
| public void setPaymentAmount(Integer paymentAmount) { | |||
| this.paymentAmount = paymentAmount; | |||
| } | |||
| public String getTransferTime() { | |||
| return this.transferTime; | |||
| } | |||
| public void setTransferTime(String transferTime) { | |||
| this.transferTime = transferTime; | |||
| } | |||
| public String getDesc() { | |||
| return this.desc; | |||
| } | |||
| public void setDesc(String desc) { | |||
| this.desc = desc; | |||
| } | |||
| } | |||
| @@ -1,13 +1,19 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * 企业付款返回结果 | |||
| * Created by Binary Wang on 2016/10/02. | |||
| * | |||
| * @author binarywang (https://github.com/binarywang) | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxEntPayResult extends WxPayBaseResult { | |||
| @@ -42,43 +48,4 @@ public class WxEntPayResult extends WxPayBaseResult { | |||
| @XStreamAlias("payment_time") | |||
| private String paymentTime; | |||
| public String getMchAppid() { | |||
| return this.mchAppid; | |||
| } | |||
| public void setMchAppid(String mchAppid) { | |||
| this.mchAppid = mchAppid; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getPartnerTradeNo() { | |||
| return this.partnerTradeNo; | |||
| } | |||
| public void setPartnerTradeNo(String partnerTradeNo) { | |||
| this.partnerTradeNo = partnerTradeNo; | |||
| } | |||
| public String getPaymentNo() { | |||
| return this.paymentNo; | |||
| } | |||
| public void setPaymentNo(String paymentNo) { | |||
| this.paymentNo = paymentNo; | |||
| } | |||
| public String getPaymentTime() { | |||
| return this.paymentTime; | |||
| } | |||
| public void setPaymentTime(String paymentTime) { | |||
| this.paymentTime = paymentTime; | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| * 授权码查询openid接口请求结果类 | |||
| * Created by Binary Wang on 2017-3-27. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayAuthcode2OpenidResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -23,18 +30,4 @@ public class WxPayAuthcode2OpenidResult extends WxPayBaseResult { | |||
| @XStreamAlias("openid") | |||
| private String openid; | |||
| public WxPayAuthcode2OpenidResult() { | |||
| } | |||
| public WxPayAuthcode2OpenidResult(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| } | |||
| @@ -7,6 +7,7 @@ import com.google.common.base.Joiner; | |||
| import com.google.common.collect.Maps; | |||
| import com.thoughtworks.xstream.XStream; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| import me.chanjar.weixin.common.util.xml.XStreamInitializer; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -30,9 +31,11 @@ import java.util.Map; | |||
| * <pre> | |||
| * 微信支付结果共用属性类 | |||
| * Created by Binary Wang on 2016-10-24. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| public abstract class WxPayBaseResult { | |||
| /** | |||
| * 返回状态码 | |||
| @@ -124,14 +127,6 @@ public abstract class WxPayBaseResult { | |||
| return result; | |||
| } | |||
| public String getXmlString() { | |||
| return this.xmlString; | |||
| } | |||
| public void setXmlString(String xmlString) { | |||
| this.xmlString = xmlString; | |||
| } | |||
| protected Logger getLogger() { | |||
| return LoggerFactory.getLogger(this.getClass()); | |||
| } | |||
| @@ -141,94 +136,6 @@ public abstract class WxPayBaseResult { | |||
| return ToStringUtils.toSimpleString(this); | |||
| } | |||
| public String getReturnCode() { | |||
| return this.returnCode; | |||
| } | |||
| public void setReturnCode(String returnCode) { | |||
| this.returnCode = returnCode; | |||
| } | |||
| public String getReturnMsg() { | |||
| return this.returnMsg; | |||
| } | |||
| public void setReturnMsg(String returnMsg) { | |||
| this.returnMsg = returnMsg; | |||
| } | |||
| public String getResultCode() { | |||
| return this.resultCode; | |||
| } | |||
| public void setResultCode(String resultCode) { | |||
| this.resultCode = resultCode; | |||
| } | |||
| public String getErrCode() { | |||
| return this.errCode; | |||
| } | |||
| public void setErrCode(String errCode) { | |||
| this.errCode = errCode; | |||
| } | |||
| public String getErrCodeDes() { | |||
| return this.errCodeDes; | |||
| } | |||
| public void setErrCodeDes(String errCodeDes) { | |||
| this.errCodeDes = errCodeDes; | |||
| } | |||
| public String getAppid() { | |||
| return this.appid; | |||
| } | |||
| public void setAppid(String appid) { | |||
| this.appid = appid; | |||
| } | |||
| public String getMchId() { | |||
| return this.mchId; | |||
| } | |||
| public void setMchId(String mchId) { | |||
| this.mchId = mchId; | |||
| } | |||
| public String getNonceStr() { | |||
| return this.nonceStr; | |||
| } | |||
| public void setNonceStr(String nonceStr) { | |||
| this.nonceStr = nonceStr; | |||
| } | |||
| public String getSign() { | |||
| return this.sign; | |||
| } | |||
| public void setSign(String sign) { | |||
| this.sign = sign; | |||
| } | |||
| public String getSubAppId() { | |||
| return subAppId; | |||
| } | |||
| public void setSubAppId(String subAppId) { | |||
| this.subAppId = subAppId; | |||
| } | |||
| public String getSubMchId() { | |||
| return subMchId; | |||
| } | |||
| public void setSubMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| } | |||
| /** | |||
| * 将bean通过保存的xml字符串转换成map | |||
| */ | |||
| @@ -1,5 +1,7 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| import java.io.Serializable; | |||
| @@ -9,6 +11,8 @@ import java.io.Serializable; | |||
| * 交易状态:REFUND 付款银行:CFT 货币种类:CNY 总金额:0.00 企业红包金额:0.00 微信退款单号: 商户退款单号:20170406010000933 退款金额:0.01 企业红包退款金额:0.00 | |||
| * 退款类型:ORIGINAL 退款状态:SUCCESS 商品名称: 商户数据包: 手续费:0.00000 费率 :0.60% | |||
| */ | |||
| @Data | |||
| @NoArgsConstructor | |||
| public class WxPayBillBaseResult implements Serializable { | |||
| private static final long serialVersionUID = 2226245109137435453L; | |||
| @@ -114,200 +118,4 @@ public class WxPayBillBaseResult implements Serializable { | |||
| */ | |||
| private String poundageRate; | |||
| public static long getSerialversionuid() { | |||
| return serialVersionUID; | |||
| } | |||
| public String getTradeTime() { | |||
| return tradeTime; | |||
| } | |||
| public void setTradeTime(String tradeTime) { | |||
| this.tradeTime = tradeTime; | |||
| } | |||
| public String getAppId() { | |||
| return appId; | |||
| } | |||
| public void setAppId(String appId) { | |||
| this.appId = appId; | |||
| } | |||
| public String getMchId() { | |||
| return mchId; | |||
| } | |||
| public void setMchId(String mchId) { | |||
| this.mchId = mchId; | |||
| } | |||
| public String getSubMchId() { | |||
| return subMchId; | |||
| } | |||
| public void setSubMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| } | |||
| public String getDeviceInfo() { | |||
| return deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getTransactionId() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getOpenId() { | |||
| return openId; | |||
| } | |||
| public void setOpenId(String openId) { | |||
| this.openId = openId; | |||
| } | |||
| public String getTradeType() { | |||
| return tradeType; | |||
| } | |||
| public void setTradeType(String tradeType) { | |||
| this.tradeType = tradeType; | |||
| } | |||
| public String getTradeState() { | |||
| return tradeState; | |||
| } | |||
| public void setTradeState(String tradeState) { | |||
| this.tradeState = tradeState; | |||
| } | |||
| public String getBankType() { | |||
| return bankType; | |||
| } | |||
| public void setBankType(String bankType) { | |||
| this.bankType = bankType; | |||
| } | |||
| public String getFeeType() { | |||
| return feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public String getTotalFee() { | |||
| return totalFee; | |||
| } | |||
| public void setTotalFee(String totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public String getCouponFee() { | |||
| return couponFee; | |||
| } | |||
| public void setCouponFee(String couponFee) { | |||
| this.couponFee = couponFee; | |||
| } | |||
| public String getRefundId() { | |||
| return refundId; | |||
| } | |||
| public void setRefundId(String refundId) { | |||
| this.refundId = refundId; | |||
| } | |||
| public String getOutRefundNo() { | |||
| return outRefundNo; | |||
| } | |||
| public void setOutRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| } | |||
| public String getSettlementRefundFee() { | |||
| return settlementRefundFee; | |||
| } | |||
| public void setSettlementRefundFee(String settlementRefundFee) { | |||
| this.settlementRefundFee = settlementRefundFee; | |||
| } | |||
| public String getCouponRefundFee() { | |||
| return couponRefundFee; | |||
| } | |||
| public void setCouponRefundFee(String couponRefundFee) { | |||
| this.couponRefundFee = couponRefundFee; | |||
| } | |||
| public String getRefundChannel() { | |||
| return refundChannel; | |||
| } | |||
| public void setRefundChannel(String refundChannel) { | |||
| this.refundChannel = refundChannel; | |||
| } | |||
| public String getRefundState() { | |||
| return refundState; | |||
| } | |||
| public void setRefundState(String refundState) { | |||
| this.refundState = refundState; | |||
| } | |||
| public String getBody() { | |||
| return body; | |||
| } | |||
| public void setBody(String body) { | |||
| this.body = body; | |||
| } | |||
| public String getAttach() { | |||
| return attach; | |||
| } | |||
| public void setAttach(String attach) { | |||
| this.attach = attach; | |||
| } | |||
| public String getPoundage() { | |||
| return poundage; | |||
| } | |||
| public void setPoundage(String poundage) { | |||
| this.poundage = poundage; | |||
| } | |||
| public String getPoundageRate() { | |||
| return poundageRate; | |||
| } | |||
| public void setPoundageRate(String poundageRate) { | |||
| this.poundageRate = poundageRate; | |||
| } | |||
| } | |||
| @@ -1,10 +1,14 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import lombok.Data; | |||
| import lombok.NoArgsConstructor; | |||
| import me.chanjar.weixin.common.util.ToStringUtils; | |||
| import java.io.Serializable; | |||
| import java.util.List; | |||
| @Data | |||
| @NoArgsConstructor | |||
| public class WxPayBillResult implements Serializable { | |||
| private static final long serialVersionUID = -7687458652694204070L; | |||
| @@ -38,53 +42,4 @@ public class WxPayBillResult implements Serializable { | |||
| */ | |||
| private String totalPoundageFee; | |||
| public List<WxPayBillBaseResult> getWxPayBillBaseResultLst() { | |||
| return wxPayBillBaseResultLst; | |||
| } | |||
| public void setWxPayBillBaseResultLst(List<WxPayBillBaseResult> wxPayBillBaseResultLst) { | |||
| this.wxPayBillBaseResultLst = wxPayBillBaseResultLst; | |||
| } | |||
| public String getTotalRecord() { | |||
| return totalRecord; | |||
| } | |||
| public void setTotalRecord(String totalRecord) { | |||
| this.totalRecord = totalRecord; | |||
| } | |||
| public String getTotalFee() { | |||
| return totalFee; | |||
| } | |||
| public void setTotalFee(String totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public String getTotalRefundFee() { | |||
| return totalRefundFee; | |||
| } | |||
| public void setTotalRefundFee(String totalRefundFee) { | |||
| this.totalRefundFee = totalRefundFee; | |||
| } | |||
| public String getTotalCouponFee() { | |||
| return totalCouponFee; | |||
| } | |||
| public void setTotalCouponFee(String totalCouponFee) { | |||
| this.totalCouponFee = totalCouponFee; | |||
| } | |||
| public String getTotalPoundageFee() { | |||
| return totalPoundageFee; | |||
| } | |||
| public void setTotalPoundageFee(String totalPoundageFee) { | |||
| this.totalPoundageFee = totalPoundageFee; | |||
| } | |||
| } | |||
| @@ -6,8 +6,9 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * <pre> | |||
| * 微信支付结果仅包含有return 和result等相关信息的的属性类 | |||
| * Created by Binary Wang on 2017-01-09. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @XStreamAlias("xml") | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| * 提交刷卡支付接口响应结果对象类 | |||
| * Created by Binary Wang on 2017-3-23. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayMicropayResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -206,123 +213,4 @@ public class WxPayMicropayResult extends WxPayBaseResult { | |||
| @XStreamAlias("promotion_detail") | |||
| private String promotionDetail; | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getIsSubscribe() { | |||
| return this.isSubscribe; | |||
| } | |||
| public void setIsSubscribe(String isSubscribe) { | |||
| this.isSubscribe = isSubscribe; | |||
| } | |||
| public String getTradeType() { | |||
| return this.tradeType; | |||
| } | |||
| public void setTradeType(String tradeType) { | |||
| this.tradeType = tradeType; | |||
| } | |||
| public String getBankType() { | |||
| return this.bankType; | |||
| } | |||
| public void setBankType(String bankType) { | |||
| this.bankType = bankType; | |||
| } | |||
| public String getFeeType() { | |||
| return this.feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public String getTotalFee() { | |||
| return this.totalFee; | |||
| } | |||
| public void setTotalFee(String totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public Integer getSettlementTotalFee() { | |||
| return this.settlementTotalFee; | |||
| } | |||
| public void setSettlementTotalFee(Integer settlementTotalFee) { | |||
| this.settlementTotalFee = settlementTotalFee; | |||
| } | |||
| public Integer getCouponFee() { | |||
| return this.couponFee; | |||
| } | |||
| public void setCouponFee(Integer couponFee) { | |||
| this.couponFee = couponFee; | |||
| } | |||
| public String getCashFeeType() { | |||
| return this.cashFeeType; | |||
| } | |||
| public void setCashFeeType(String cashFeeType) { | |||
| this.cashFeeType = cashFeeType; | |||
| } | |||
| public Integer getCashFee() { | |||
| return this.cashFee; | |||
| } | |||
| public void setCashFee(Integer cashFee) { | |||
| this.cashFee = cashFee; | |||
| } | |||
| public String getTransactionId() { | |||
| return this.transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getAttach() { | |||
| return this.attach; | |||
| } | |||
| public void setAttach(String attach) { | |||
| this.attach = attach; | |||
| } | |||
| public String getTimeEnd() { | |||
| return this.timeEnd; | |||
| } | |||
| public void setTimeEnd(String timeEnd) { | |||
| this.timeEnd = timeEnd; | |||
| } | |||
| public String getPromotionDetail() { | |||
| return this.promotionDetail; | |||
| } | |||
| public void setPromotionDetail(String promotionDetail) { | |||
| this.promotionDetail = promotionDetail; | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| * 关闭订单结果对象类 | |||
| * Created by Binary Wang on 2016-10-27. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderCloseResult extends WxPayBaseResult { | |||
| @@ -18,11 +25,4 @@ public class WxPayOrderCloseResult extends WxPayBaseResult { | |||
| @XStreamAlias("result_msg") | |||
| private String resultMsg; | |||
| public String getResultMsg() { | |||
| return this.resultMsg; | |||
| } | |||
| public void setResultMsg(String resultMsg) { | |||
| this.resultMsg = resultMsg; | |||
| } | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.github.binarywang.wxpay.bean.result; | |||
| import com.google.common.collect.Lists; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import java.util.List; | |||
| @@ -18,8 +19,11 @@ import java.util.List; | |||
| * <li>描述 | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderQueryResult extends WxPayBaseResult { | |||
| @@ -236,158 +240,6 @@ public class WxPayOrderQueryResult extends WxPayBaseResult { | |||
| @XStreamAlias("trade_state_desc") | |||
| private String tradeStateDesc; | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getOpenid() { | |||
| return this.openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public String getIsSubscribe() { | |||
| return this.isSubscribe; | |||
| } | |||
| public void setIsSubscribe(String isSubscribe) { | |||
| this.isSubscribe = isSubscribe; | |||
| } | |||
| public String getTradeType() { | |||
| return this.tradeType; | |||
| } | |||
| public void setTradeType(String tradeType) { | |||
| this.tradeType = tradeType; | |||
| } | |||
| public String getTradeState() { | |||
| return this.tradeState; | |||
| } | |||
| public void setTradeState(String tradeState) { | |||
| this.tradeState = tradeState; | |||
| } | |||
| public String getBankType() { | |||
| return this.bankType; | |||
| } | |||
| public void setBankType(String bankType) { | |||
| this.bankType = bankType; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return this.totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public Integer getSettlementTotalFee() { | |||
| return this.settlementTotalFee; | |||
| } | |||
| public void setSettlementTotalFee(Integer settlementTotalFee) { | |||
| this.settlementTotalFee = settlementTotalFee; | |||
| } | |||
| public String getFeeType() { | |||
| return this.feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public Integer getCashFee() { | |||
| return this.cashFee; | |||
| } | |||
| public void setCashFee(Integer cashFee) { | |||
| this.cashFee = cashFee; | |||
| } | |||
| public String getCashFeeType() { | |||
| return this.cashFeeType; | |||
| } | |||
| public void setCashFeeType(String cashFeeType) { | |||
| this.cashFeeType = cashFeeType; | |||
| } | |||
| public Integer getCouponFee() { | |||
| return this.couponFee; | |||
| } | |||
| public void setCouponFee(Integer couponFee) { | |||
| this.couponFee = couponFee; | |||
| } | |||
| public Integer getCouponCount() { | |||
| return this.couponCount; | |||
| } | |||
| public void setCouponCount(Integer couponCount) { | |||
| this.couponCount = couponCount; | |||
| } | |||
| public List<Coupon> getCoupons() { | |||
| return this.coupons; | |||
| } | |||
| public void setCoupons(List<Coupon> coupons) { | |||
| this.coupons = coupons; | |||
| } | |||
| public String getTransactionId() { | |||
| return this.transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getAttach() { | |||
| return this.attach; | |||
| } | |||
| public void setAttach(String attach) { | |||
| this.attach = attach; | |||
| } | |||
| public String getTimeEnd() { | |||
| return this.timeEnd; | |||
| } | |||
| public void setTimeEnd(String timeEnd) { | |||
| this.timeEnd = timeEnd; | |||
| } | |||
| public String getTradeStateDesc() { | |||
| return this.tradeStateDesc; | |||
| } | |||
| public void setTradeStateDesc(String tradeStateDesc) { | |||
| this.tradeStateDesc = tradeStateDesc; | |||
| } | |||
| /** | |||
| * 通过xml组装coupons属性内容 | |||
| */ | |||
| @@ -402,6 +254,9 @@ public class WxPayOrderQueryResult extends WxPayBaseResult { | |||
| } | |||
| } | |||
| @Data | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @AllArgsConstructor | |||
| public static class Coupon { | |||
| /** | |||
| * <pre>代金券类型 | |||
| @@ -438,35 +293,5 @@ public class WxPayOrderQueryResult extends WxPayBaseResult { | |||
| */ | |||
| private Integer couponFee; | |||
| public Coupon(String couponType, String couponId, Integer couponFee) { | |||
| this.couponType = couponType; | |||
| this.couponId = couponId; | |||
| this.couponFee = couponFee; | |||
| } | |||
| public String getCouponType() { | |||
| return this.couponType; | |||
| } | |||
| public void setCouponType(String couponType) { | |||
| this.couponType = couponType; | |||
| } | |||
| public String getCouponId() { | |||
| return this.couponId; | |||
| } | |||
| public void setCouponId(String couponId) { | |||
| this.couponId = couponId; | |||
| } | |||
| public Integer getCouponFee() { | |||
| return this.couponFee; | |||
| } | |||
| public void setCouponFee(Integer couponFee) { | |||
| this.couponFee = couponFee; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| * 撤销订单响应结果类 | |||
| * Created by Binary Wang on 2017-3-23. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayOrderReverseResult extends WxPayBaseResult { | |||
| @@ -25,11 +32,4 @@ public class WxPayOrderReverseResult extends WxPayBaseResult { | |||
| @XStreamAlias("recall") | |||
| private String isRecall; | |||
| public String getIsRecall() { | |||
| return this.isRecall; | |||
| } | |||
| public void setIsRecall(String isRecall) { | |||
| this.isRecall = isRecall; | |||
| } | |||
| } | |||
| @@ -1,6 +1,9 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| @@ -12,9 +15,13 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * 类型 | |||
| * 说明 | |||
| * Created by Binary Wang on 2016-11-28. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRedpackQueryResult extends WxPayBaseResult { | |||
| @@ -259,148 +266,4 @@ public class WxPayRedpackQueryResult extends WxPayBaseResult { | |||
| */ | |||
| @XStreamAlias("rcv_time") | |||
| private String receiveTime; | |||
| public String getMchBillNo() { | |||
| return mchBillNo; | |||
| } | |||
| public void setMchBillNo(String mchBillNo) { | |||
| this.mchBillNo = mchBillNo; | |||
| } | |||
| public String getDetailId() { | |||
| return detailId; | |||
| } | |||
| public void setDetailId(String detailId) { | |||
| this.detailId = detailId; | |||
| } | |||
| public String getStatus() { | |||
| return status; | |||
| } | |||
| public void setStatus(String status) { | |||
| this.status = status; | |||
| } | |||
| public String getSendType() { | |||
| return sendType; | |||
| } | |||
| public void setSendType(String sendType) { | |||
| this.sendType = sendType; | |||
| } | |||
| public String getHbType() { | |||
| return hbType; | |||
| } | |||
| public void setHbType(String hbType) { | |||
| this.hbType = hbType; | |||
| } | |||
| public Integer getTotalNum() { | |||
| return totalNum; | |||
| } | |||
| public void setTotalNum(Integer totalNum) { | |||
| this.totalNum = totalNum; | |||
| } | |||
| public Integer getTotalAmount() { | |||
| return totalAmount; | |||
| } | |||
| public void setTotalAmount(Integer totalAmount) { | |||
| this.totalAmount = totalAmount; | |||
| } | |||
| public String getReason() { | |||
| return reason; | |||
| } | |||
| public void setReason(String reason) { | |||
| this.reason = reason; | |||
| } | |||
| public String getSendTime() { | |||
| return sendTime; | |||
| } | |||
| public void setSendTime(String sendTime) { | |||
| this.sendTime = sendTime; | |||
| } | |||
| public String getRefundTime() { | |||
| return refundTime; | |||
| } | |||
| public void setRefundTime(String refundTime) { | |||
| this.refundTime = refundTime; | |||
| } | |||
| public Integer getRefundAmount() { | |||
| return refundAmount; | |||
| } | |||
| public void setRefundAmount(Integer refundAmount) { | |||
| this.refundAmount = refundAmount; | |||
| } | |||
| public String getWishing() { | |||
| return wishing; | |||
| } | |||
| public void setWishing(String wishing) { | |||
| this.wishing = wishing; | |||
| } | |||
| public String getRemark() { | |||
| return remark; | |||
| } | |||
| public void setRemark(String remark) { | |||
| this.remark = remark; | |||
| } | |||
| public String getActName() { | |||
| return actName; | |||
| } | |||
| public void setActName(String actName) { | |||
| this.actName = actName; | |||
| } | |||
| public String getHblist() { | |||
| return hblist; | |||
| } | |||
| public void setHblist(String hblist) { | |||
| this.hblist = hblist; | |||
| } | |||
| public String getOpenid() { | |||
| return openid; | |||
| } | |||
| public void setOpenid(String openid) { | |||
| this.openid = openid; | |||
| } | |||
| public Integer getAmount() { | |||
| return amount; | |||
| } | |||
| public void setAmount(Integer amount) { | |||
| this.amount = amount; | |||
| } | |||
| public String getReceiveTime() { | |||
| return receiveTime; | |||
| } | |||
| public void setReceiveTime(String receiveTime) { | |||
| this.receiveTime = receiveTime; | |||
| } | |||
| } | |||
| @@ -2,15 +2,20 @@ package com.github.binarywang.wxpay.bean.result; | |||
| import com.google.common.collect.Lists; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.*; | |||
| import java.util.List; | |||
| /** | |||
| * <pre> | |||
| * Created by Binary Wang on 2016-11-24. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRefundQueryResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -111,78 +116,6 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { | |||
| private List<RefundRecord> refundRecords; | |||
| public String getDeviceInfo() { | |||
| return deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getTransactionId() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public Integer getTotalFee() { | |||
| return totalFee; | |||
| } | |||
| public void setTotalFee(Integer totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public Integer getSettlementTotalFee() { | |||
| return settlementTotalFee; | |||
| } | |||
| public void setSettlementTotalFee(Integer settlementTotalFee) { | |||
| this.settlementTotalFee = settlementTotalFee; | |||
| } | |||
| public String getFeeType() { | |||
| return feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public Integer getCashFee() { | |||
| return cashFee; | |||
| } | |||
| public void setCashFee(Integer cashFee) { | |||
| this.cashFee = cashFee; | |||
| } | |||
| public Integer getRefundCount() { | |||
| return refundCount; | |||
| } | |||
| public void setRefundCount(Integer refundCount) { | |||
| this.refundCount = refundCount; | |||
| } | |||
| public List<RefundRecord> getRefundRecords() { | |||
| return refundRecords; | |||
| } | |||
| public void setRefundRecords(List<RefundRecord> refundRecords) { | |||
| this.refundRecords = refundRecords; | |||
| } | |||
| /** | |||
| * 组装生成退款记录属性的内容 | |||
| */ | |||
| @@ -203,7 +136,7 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { | |||
| 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)); | |||
| refundRecord.setRefundRecvAccout(this.getXmlValue("xml/refund_recv_accout_" + i)); | |||
| refundRecord.setRefundRecvAccount(this.getXmlValue("xml/refund_recv_accout_" + i)); | |||
| if (refundRecord.getCouponRefundCount() == null || refundRecord.getCouponRefundCount() == 0) { | |||
| continue; | |||
| @@ -223,6 +156,10 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { | |||
| } | |||
| } | |||
| @Data | |||
| @Builder(builderMethodName = "newBuilder") | |||
| @NoArgsConstructor | |||
| @AllArgsConstructor | |||
| public static class RefundRecord { | |||
| /** | |||
| * <pre> | |||
| @@ -371,104 +308,10 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { | |||
| * </pre> | |||
| */ | |||
| @XStreamAlias("refund_recv_accout") | |||
| private String refundRecvAccout; | |||
| public String getOutRefundNo() { | |||
| return outRefundNo; | |||
| } | |||
| public void setOutRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| } | |||
| public String getRefundId() { | |||
| return refundId; | |||
| } | |||
| public void setRefundId(String refundId) { | |||
| this.refundId = refundId; | |||
| } | |||
| public String getRefundChannel() { | |||
| return refundChannel; | |||
| } | |||
| public void setRefundChannel(String refundChannel) { | |||
| this.refundChannel = refundChannel; | |||
| } | |||
| public Integer getRefundFee() { | |||
| return refundFee; | |||
| } | |||
| public void setRefundFee(Integer refundFee) { | |||
| this.refundFee = refundFee; | |||
| } | |||
| public Integer getSettlementRefundFee() { | |||
| return settlementRefundFee; | |||
| } | |||
| public void setSettlementRefundFee(Integer settlementRefundFee) { | |||
| this.settlementRefundFee = settlementRefundFee; | |||
| } | |||
| public String getRefundAccount() { | |||
| return refundAccount; | |||
| } | |||
| public void setRefundAccount(String refundAccount) { | |||
| this.refundAccount = refundAccount; | |||
| } | |||
| public String getCouponType() { | |||
| return couponType; | |||
| } | |||
| public void setCouponType(String couponType) { | |||
| this.couponType = couponType; | |||
| } | |||
| public Integer getCouponRefundFee() { | |||
| return couponRefundFee; | |||
| } | |||
| public void setCouponRefundFee(Integer couponRefundFee) { | |||
| this.couponRefundFee = couponRefundFee; | |||
| } | |||
| public Integer getCouponRefundCount() { | |||
| return couponRefundCount; | |||
| } | |||
| public void setCouponRefundCount(Integer couponRefundCount) { | |||
| this.couponRefundCount = couponRefundCount; | |||
| } | |||
| public List<RefundCoupon> getRefundCoupons() { | |||
| return refundCoupons; | |||
| } | |||
| public void setRefundCoupons(List<RefundCoupon> refundCoupons) { | |||
| this.refundCoupons = refundCoupons; | |||
| } | |||
| public String getRefundStatus() { | |||
| return refundStatus; | |||
| } | |||
| public void setRefundStatus(String refundStatus) { | |||
| this.refundStatus = refundStatus; | |||
| } | |||
| public String getRefundRecvAccout() { | |||
| return refundRecvAccout; | |||
| } | |||
| public void setRefundRecvAccout(String refundRecvAccout) { | |||
| this.refundRecvAccout = refundRecvAccout; | |||
| } | |||
| private String refundRecvAccount; | |||
| @Data | |||
| @NoArgsConstructor | |||
| public static class RefundCoupon { | |||
| /** | |||
| * <pre> | |||
| @@ -516,12 +359,6 @@ public class WxPayRefundQueryResult extends WxPayBaseResult { | |||
| this.couponRefundFee = couponRefundFee; | |||
| } | |||
| @Deprecated | |||
| public RefundCoupon(String couponRefundBatchId, String couponRefundId, Integer couponRefundFee) { | |||
| this.couponRefundBatchId = couponRefundBatchId; | |||
| this.couponRefundId = couponRefundId; | |||
| this.couponRefundFee = couponRefundFee; | |||
| } | |||
| } | |||
| } | |||
| @@ -1,6 +1,9 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| import java.io.Serializable; | |||
| @@ -12,6 +15,9 @@ import java.io.Serializable; | |||
| * | |||
| * @author liukaitj | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayRefundResult extends WxPayBaseResult implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -58,116 +64,4 @@ public class WxPayRefundResult extends WxPayBaseResult implements Serializable { | |||
| @XStreamAlias("coupon_refund_id") | |||
| private String couponRefundId; | |||
| public String getDeviceInfo() { | |||
| return this.deviceInfo; | |||
| } | |||
| public void setDeviceInfo(String deviceInfo) { | |||
| this.deviceInfo = deviceInfo; | |||
| } | |||
| public String getTransactionId() { | |||
| return this.transactionId; | |||
| } | |||
| public void setTransactionId(String transactionId) { | |||
| this.transactionId = transactionId; | |||
| } | |||
| public String getOutTradeNo() { | |||
| return this.outTradeNo; | |||
| } | |||
| public void setOutTradeNo(String outTradeNo) { | |||
| this.outTradeNo = outTradeNo; | |||
| } | |||
| public String getOutRefundNo() { | |||
| return this.outRefundNo; | |||
| } | |||
| public void setOutRefundNo(String outRefundNo) { | |||
| this.outRefundNo = outRefundNo; | |||
| } | |||
| public String getRefundId() { | |||
| return this.refundId; | |||
| } | |||
| public void setRefundId(String refundId) { | |||
| this.refundId = refundId; | |||
| } | |||
| public String getRefundChannel() { | |||
| return this.refundChannel; | |||
| } | |||
| public void setRefundChannel(String refundChannel) { | |||
| this.refundChannel = refundChannel; | |||
| } | |||
| public String getRefundFee() { | |||
| return this.refundFee; | |||
| } | |||
| public void setRefundFee(String refundFee) { | |||
| this.refundFee = refundFee; | |||
| } | |||
| public String getTotalFee() { | |||
| return this.totalFee; | |||
| } | |||
| public void setTotalFee(String totalFee) { | |||
| this.totalFee = totalFee; | |||
| } | |||
| public String getFeeType() { | |||
| return this.feeType; | |||
| } | |||
| public void setFeeType(String feeType) { | |||
| this.feeType = feeType; | |||
| } | |||
| public String getCashFee() { | |||
| return this.cashFee; | |||
| } | |||
| public void setCashFee(String cashFee) { | |||
| this.cashFee = cashFee; | |||
| } | |||
| public String getCashRefundFee() { | |||
| return this.cashRefundFee; | |||
| } | |||
| public void setCashRefundFee(String cashRefundFee) { | |||
| this.cashRefundFee = cashRefundFee; | |||
| } | |||
| public String getCouponRefundFee() { | |||
| return this.couponRefundFee; | |||
| } | |||
| public void setCouponRefundFee(String couponRefundFee) { | |||
| this.couponRefundFee = couponRefundFee; | |||
| } | |||
| public String getCouponRefundCount() { | |||
| return this.couponRefundCount; | |||
| } | |||
| public void setCouponRefundCount(String couponRefundCount) { | |||
| this.couponRefundCount = couponRefundCount; | |||
| } | |||
| public String getCouponRefundId() { | |||
| return this.couponRefundId; | |||
| } | |||
| public void setCouponRefundId(String couponRefundId) { | |||
| this.couponRefundId = couponRefundId; | |||
| } | |||
| } | |||
| @@ -1,6 +1,9 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| @@ -9,6 +12,9 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPaySandboxSignKeyResult extends WxPayBaseResult { | |||
| @@ -25,11 +31,4 @@ public class WxPaySandboxSignKeyResult extends WxPayBaseResult { | |||
| @XStreamAlias("sandbox_signkey") | |||
| private String sandboxSignKey; | |||
| public String getSandboxSignKey() { | |||
| return sandboxSignKey; | |||
| } | |||
| public void setSandboxSignKey(String sandboxSignKey) { | |||
| this.sandboxSignKey = sandboxSignKey; | |||
| } | |||
| } | |||
| @@ -1,6 +1,9 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| import java.io.Serializable; | |||
| @@ -10,6 +13,9 @@ import java.io.Serializable; | |||
| * | |||
| * @author kane | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPaySendRedpackResult extends WxPayBaseResult implements Serializable { | |||
| private static final long serialVersionUID = -4837415036337132073L; | |||
| @@ -32,51 +38,4 @@ public class WxPaySendRedpackResult extends WxPayBaseResult implements Serializa | |||
| @XStreamAlias("send_listid") | |||
| private String sendListid; | |||
| public String getMchBillno() { | |||
| return this.mchBillno; | |||
| } | |||
| public void setMchBillno(String mchBillno) { | |||
| this.mchBillno = mchBillno; | |||
| } | |||
| public String getWxappid() { | |||
| return this.wxappid; | |||
| } | |||
| public void setWxappid(String wxappid) { | |||
| this.wxappid = wxappid; | |||
| } | |||
| public String getReOpenid() { | |||
| return this.reOpenid; | |||
| } | |||
| public void setReOpenid(String reOpenid) { | |||
| this.reOpenid = reOpenid; | |||
| } | |||
| public int getTotalAmount() { | |||
| return this.totalAmount; | |||
| } | |||
| public void setTotalAmount(int totalAmount) { | |||
| this.totalAmount = totalAmount; | |||
| } | |||
| public String getSendTime() { | |||
| return this.sendTime; | |||
| } | |||
| public void setSendTime(String sendTime) { | |||
| this.sendTime = sendTime; | |||
| } | |||
| public String getSendListid() { | |||
| return this.sendListid; | |||
| } | |||
| public void setSendListid(String sendListid) { | |||
| this.sendListid = sendListid; | |||
| } | |||
| } | |||
| @@ -1,14 +1,21 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| * 转换短链接结果对象类 | |||
| * Created by Binary Wang on 2017-3-27. | |||
| * @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
| * </pre> | |||
| * | |||
| * @author <a href="https://github.com/binarywang">Binary Wang</a> | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayShorturlResult extends WxPayBaseResult { | |||
| /** | |||
| @@ -24,11 +31,4 @@ public class WxPayShorturlResult extends WxPayBaseResult { | |||
| @XStreamAlias("short_url") | |||
| private String shortUrl; | |||
| public String getShortUrl() { | |||
| return this.shortUrl; | |||
| } | |||
| public void setShortUrl(String shortUrl) { | |||
| this.shortUrl = shortUrl; | |||
| } | |||
| } | |||
| @@ -1,6 +1,9 @@ | |||
| package com.github.binarywang.wxpay.bean.result; | |||
| import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.NoArgsConstructor; | |||
| /** | |||
| * <pre> | |||
| @@ -10,6 +13,9 @@ import com.thoughtworks.xstream.annotations.XStreamAlias; | |||
| * | |||
| * @author chanjarster | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @NoArgsConstructor | |||
| @XStreamAlias("xml") | |||
| public class WxPayUnifiedOrderResult extends WxPayBaseResult { | |||
| @@ -37,35 +43,4 @@ public class WxPayUnifiedOrderResult extends WxPayBaseResult { | |||
| @XStreamAlias("code_url") | |||
| private String codeURL; | |||
| public String getPrepayId() { | |||
| return this.prepayId; | |||
| } | |||
| public void setPrepayId(String prepayId) { | |||
| this.prepayId = prepayId; | |||
| } | |||
| public String getTradeType() { | |||
| return this.tradeType; | |||
| } | |||
| public void setTradeType(String tradeType) { | |||
| this.tradeType = tradeType; | |||
| } | |||
| public String getCodeURL() { | |||
| return this.codeURL; | |||
| } | |||
| public void setCodeURL(String codeURL) { | |||
| this.codeURL = codeURL; | |||
| } | |||
| public String getMwebUrl() { | |||
| return mwebUrl; | |||
| } | |||
| public void setMwebUrl(String mwebUrl) { | |||
| this.mwebUrl = mwebUrl; | |||
| } | |||
| } | |||