|
@@ -11,9 +11,6 @@ import com.wechat.common.util.StringUtil;
|
|
|
*/
|
|
|
public class RefundParticipation {
|
|
|
|
|
|
- //外部订单号
|
|
|
- private String outOrderNo;
|
|
|
-
|
|
|
//退款金额
|
|
|
private Long refundFee;
|
|
|
|
|
@@ -23,78 +20,81 @@ public class RefundParticipation {
|
|
|
//微信支付单号
|
|
|
private String transactionId;
|
|
|
|
|
|
- //订单号
|
|
|
- private String orderNo;
|
|
|
-
|
|
|
//外部退款单号
|
|
|
private String outRefundNo;
|
|
|
|
|
|
private String subMchid;
|
|
|
|
|
|
- public String getOutRefundNo() {
|
|
|
- return outRefundNo;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOutRefundNo(String outRefundNo) {
|
|
|
- this.outRefundNo = outRefundNo;
|
|
|
- }
|
|
|
-
|
|
|
- public String getOutOrderNo() {
|
|
|
- return outOrderNo;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOutOrderNo(String outOrderNo) {
|
|
|
- this.outOrderNo = outOrderNo;
|
|
|
- }
|
|
|
-
|
|
|
- public String getOrderNo() {
|
|
|
- return orderNo;
|
|
|
- }
|
|
|
-
|
|
|
- public void setOrderNo(String orderNo) {
|
|
|
- this.orderNo = orderNo;
|
|
|
- }
|
|
|
|
|
|
public Long getRefundFee() {
|
|
|
return refundFee;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public void setRefundFee(Long refundFee) {
|
|
|
this.refundFee = refundFee;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public String getRefundDesc() {
|
|
|
return refundDesc;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public void setRefundDesc(String refundDesc) {
|
|
|
this.refundDesc = refundDesc;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public String getTransactionId() {
|
|
|
return transactionId;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public void setTransactionId(String transactionId) {
|
|
|
this.transactionId = transactionId;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public String getOutRefundNo() {
|
|
|
+ return outRefundNo;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void setOutRefundNo(String outRefundNo) {
|
|
|
+ this.outRefundNo = outRefundNo;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public String getSubMchid() {
|
|
|
return subMchid;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public void setSubMchid(String subMchid) {
|
|
|
this.subMchid = subMchid;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
- return "RefundParticipation [outOrderNo=" + outOrderNo + ", refundFee="
|
|
|
- + refundFee + ", refundDesc=" + refundDesc + ", transactionId="
|
|
|
- + transactionId + ", orderNo=" + orderNo + ", outRefundNo="
|
|
|
- + outRefundNo + ", subMchid=" + subMchid + "]";
|
|
|
+ return "RefundParticipation [refundFee=" + refundFee + ", refundDesc="
|
|
|
+ + refundDesc + ", transactionId=" + transactionId
|
|
|
+ + ", outRefundNo=" + outRefundNo + ", subMchid=" + subMchid
|
|
|
+ + "]";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public RespWrapper<Object> paramsInfo(KtjJsapiOrder order) {
|
|
|
System.out.println("入参为:" + this.toString());
|
|
|
if( null == this.refundFee || this.refundFee < 1){
|
|
@@ -103,20 +103,13 @@ System.out.println("入参为:" + this.toString());
|
|
|
if( null == this.subMchid){
|
|
|
return RespWrapper.makeFailResp("商户号不能为空!");
|
|
|
}
|
|
|
- if(StringUtil.isEmpty(this.transactionId) &&
|
|
|
- StringUtil.isEmpty(this.outOrderNo) && StringUtil.isEmpty(this.orderNo)){
|
|
|
+ if(StringUtil.isEmpty(this.transactionId) ){
|
|
|
return RespWrapper.makeFailResp("订单编号不能为空!");
|
|
|
}
|
|
|
if(StringUtil.isEmpty(this.outRefundNo)){
|
|
|
return RespWrapper.makeFailResp("退款申请单号不能为空!");
|
|
|
}
|
|
|
- if(!StringUtil.isEmpty(this.transactionId)){
|
|
|
- order.setTransactionId(this.transactionId.trim());
|
|
|
- }else if(!StringUtil.isEmpty(this.orderNo)){
|
|
|
- order.setOrderNo(this.orderNo.trim());
|
|
|
- }else if(!StringUtil.isEmpty(this.outOrderNo)){
|
|
|
- order.setOutOrderNo(this.outOrderNo);
|
|
|
- }
|
|
|
+ order.setTransactionId(this.transactionId.trim());
|
|
|
//如果退款原因为空,就加个退款原因
|
|
|
if(StringUtil.isEmpty(this.refundDesc)){
|
|
|
this.refundDesc = "订单退款";
|