Skip to content

Commit 91c5359

Browse files
authored
🆕 #3162 【微信支付】接入服务商微信支付分签约计划相关接口功能
1 parent 5752cc4 commit 91c5359

16 files changed

+1240
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
package com.github.binarywang.wxpay.bean.payscore;
2+
3+
import com.github.binarywang.wxpay.bean.payscore.enums.SignPlanServiceOrderPlanDetailStateEnum;
4+
import com.google.gson.annotations.SerializedName;
5+
import lombok.Data;
6+
import lombok.NoArgsConstructor;
7+
8+
import java.io.Serializable;
9+
10+
/**
11+
* @author UltramanNoa
12+
* @className PartnerUserSignPlanDetail
13+
* @description 签约计划明细列表
14+
* @createTime 2023/11/3 17:19
15+
**/
16+
@Data
17+
@NoArgsConstructor
18+
public class PartnerUserSignPlanDetail implements Serializable {
19+
20+
private static final long serialVersionUID = 2089297485318293622L;
21+
/**
22+
* 计划明细序号
23+
*/
24+
@SerializedName("plan_detail_no")
25+
private Integer planDetailNo;
26+
27+
/**
28+
* 计划明细原支付金额(单位分)
29+
*/
30+
@SerializedName("original_price")
31+
private Integer originalPrice;
32+
33+
/**
34+
* 计划明细优惠说明
35+
*/
36+
@SerializedName("plan_discount_description")
37+
private String planDiscountDescription;
38+
39+
/**
40+
* 计划明细实际支付金额(单位分)
41+
*/
42+
@SerializedName("actual_price")
43+
private Integer actualPrice;
44+
45+
/**
46+
* 计划明细状态
47+
*
48+
* @see SignPlanServiceOrderPlanDetailStateEnum
49+
*/
50+
@SerializedName("plan_detail_state")
51+
private String planDetailState;
52+
53+
/**
54+
* 计划明细对应的支付分服务单号
55+
*/
56+
@SerializedName("order_id")
57+
private String orderId;
58+
59+
/**
60+
* 商户侧计划明细使用订单号
61+
*/
62+
@SerializedName("merchant_plan_detail_no")
63+
private String merchantPlanDetailNo;
64+
65+
/**
66+
* 计划详情名称
67+
*/
68+
@SerializedName("plan_detail_name")
69+
private Integer planDetailName;
70+
71+
/**
72+
* 计划明细对应订单实际支付金额(单位分)
73+
*/
74+
@SerializedName("actual_pay_price")
75+
private Integer actualPayPrice;
76+
77+
/**
78+
* 详情使用时间
79+
*/
80+
@SerializedName("use_time")
81+
private String useTime;
82+
83+
/**
84+
* 详情完成时间
85+
*/
86+
@SerializedName("complete_time")
87+
private String completeTime;
88+
89+
/**
90+
* 详情取消时间
91+
*/
92+
@SerializedName("cancel_time")
93+
private String cancelTime;
94+
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
package com.github.binarywang.wxpay.bean.payscore;
2+
3+
import com.github.binarywang.wxpay.bean.payscore.enums.SignPlanServiceOrderStateEnum;
4+
import com.github.binarywang.wxpay.bean.payscore.enums.UserSignPlanCancelSignTypeEnum;
5+
import com.google.gson.annotations.SerializedName;
6+
import lombok.Data;
7+
import lombok.NoArgsConstructor;
8+
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
9+
10+
import java.io.Serializable;
11+
import java.util.List;
12+
13+
/**
14+
* @author UltramanNoa
15+
* @className PartnerUserSignPlanEntity
16+
* @description 用户的签约计划
17+
* @createTime 2023/11/3 16:05
18+
**/
19+
@Data
20+
@NoArgsConstructor
21+
public class PartnerUserSignPlanEntity implements Serializable {
22+
23+
private static final long serialVersionUID = -662901613603698430L;
24+
25+
public static PartnerUserSignPlanEntity fromJson(String json) {
26+
return WxGsonBuilder.create().fromJson(json, PartnerUserSignPlanEntity.class);
27+
}
28+
29+
30+
/**
31+
* 待创建服务订单对应的用户的签约计划
32+
*/
33+
@SerializedName("sign_plan_id")
34+
private String signPlanId;
35+
36+
@SerializedName("openid")
37+
private String openid;
38+
39+
/**
40+
* <pre>
41+
* 字段名:二级商户用户标识
42+
* 变量名:sub_openid
43+
* 是否必填:否
44+
* 类型:string(128)
45+
* 描述:
46+
* 用户在二级商户appid下的唯一标识。
47+
* 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o
48+
* </pre>
49+
*/
50+
@SerializedName(value = "sub_openid")
51+
private String subOpenid;
52+
53+
54+
@SerializedName("service_id")
55+
private String serviceId;
56+
57+
@SerializedName("mchid")
58+
private String mchid;
59+
60+
/**
61+
* 子商户商户号
62+
*/
63+
@SerializedName("sub_mchid")
64+
private String subMchid;
65+
66+
@SerializedName("appid")
67+
private String appid;
68+
69+
/**
70+
* 子商户AppID
71+
*/
72+
@SerializedName("sub_appid")
73+
private String subAppid;
74+
75+
/**
76+
* 商户签约计划单号
77+
*/
78+
@SerializedName("merchant_sign_plan_no")
79+
private String merchantSignPlanNo;
80+
81+
/**
82+
* 商户回调地址
83+
*/
84+
@SerializedName("merchant_callback_url")
85+
private String merchantCallbackUrl;
86+
87+
/**
88+
* 支付分计划ID
89+
*/
90+
@SerializedName("plan_id")
91+
private String planId;
92+
93+
/**
94+
* 目前用户进行到的计划详情序号
95+
*/
96+
@SerializedName("going_detail_no")
97+
private Integer goingDetailNo;
98+
99+
/**
100+
* 计划签约状态
101+
*
102+
* @see SignPlanServiceOrderStateEnum
103+
*/
104+
@SerializedName("sign_state")
105+
private String signState;
106+
107+
/**
108+
* 签约计划取消时间
109+
*/
110+
@SerializedName("cancel_sign_time")
111+
private String cancelSignTime;
112+
113+
/**
114+
* 签约计划取消类型
115+
*
116+
* @see UserSignPlanCancelSignTypeEnum
117+
*/
118+
@SerializedName("cancel_sign_type")
119+
private String cancelSignType;
120+
121+
/**
122+
* 签约计划取消原因
123+
*/
124+
@SerializedName("cancel_reason")
125+
private String cancelReason;
126+
127+
/**
128+
* 签约计划的名称
129+
*/
130+
@SerializedName("plan_name")
131+
private String planName;
132+
133+
/**
134+
* 签约计划的过期时间
135+
*/
136+
@SerializedName("plan_over_time")
137+
private String planOverTime;
138+
139+
/**
140+
* 签约计划原总金额(单位分)
141+
*/
142+
@SerializedName("total_origin_price")
143+
private Integer totalOriginPrice;
144+
145+
/**
146+
* 签约计划扣费次数
147+
*/
148+
@SerializedName("deduction_quantity")
149+
private Integer deductionQuantity;
150+
151+
/**
152+
* 签约计划实际总金额(单位分)
153+
*/
154+
@SerializedName("total_actual_price")
155+
private Integer totalActualPrice;
156+
157+
@SerializedName("signed_detail_list")
158+
private List<PartnerUserSignPlanDetail> signedDetailList;
159+
160+
/**
161+
* 签约时间
162+
*/
163+
@SerializedName("sign_time")
164+
private String signTime;
165+
}

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/payscore/PayScoreNotifyData.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class PayScoreNotifyData implements Serializable {
3535
* <p>2、解除授权成功通知的类型为PAYSCORE.USER_CLOSE_SERVICE</p>
3636
* <p>3、用户确认成功通知的类型为PAYSCORE.USER_CONFIRM</p>
3737
* <p>4、支付成功通知的类型为PAYSCORE.USER_PAID</p>
38+
* <p>5、取消签约成功通知类型为PAYSCORE.USER_CANCEL_SIGN_PLAN</p>
39+
* <p>6、签约计划成功通知类型为PAYSCORE</p>
3840
*/
3941
@SerializedName("event_type")
4042
private String eventType;
@@ -85,5 +87,11 @@ public static class Resource implements Serializable {
8587
*/
8688
@SerializedName("associated_data")
8789
private String associatedData;
90+
91+
/**
92+
* 原始回调类型,支付分的原始回调类型为payscore
93+
*/
94+
@SerializedName("original_type")
95+
private String originalType;
8896
}
8997
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package com.github.binarywang.wxpay.bean.payscore;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* @author UltramanNoa
11+
* @className PayScorePlanDetail
12+
* @description 支付分计划明细列表
13+
* @createTime 2023/11/3 11:22
14+
**/
15+
@Data
16+
@NoArgsConstructor
17+
public class PayScorePlanDetail implements Serializable {
18+
19+
private static final long serialVersionUID = 999251141141181820L;
20+
/**
21+
* 计划明细原支付金额(单位分)
22+
*/
23+
@SerializedName("original_price")
24+
private Integer originalPrice;
25+
26+
/**
27+
* 计划明细优惠说明
28+
*/
29+
@SerializedName("plan_discount_description")
30+
private String planDiscountDescription;
31+
32+
/**
33+
* 计划明细实际支付金额(单位分)
34+
*/
35+
@SerializedName("actual_price")
36+
private String actualPrice;
37+
38+
/**
39+
* 计划明细名称
40+
*/
41+
@SerializedName("plan_detail_name")
42+
private String planDetailName;
43+
44+
/**
45+
* 计划明细序号(返回参数)
46+
*/
47+
@SerializedName("plan_detail_no")
48+
private Integer planDetailNo;
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.github.binarywang.wxpay.bean.payscore;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
import lombok.Data;
5+
import lombok.NoArgsConstructor;
6+
7+
import java.io.Serializable;
8+
9+
/**
10+
* @author UltramanNoa
11+
* @className UserSignPlanDetailMerchatNo
12+
* @description 签约计划对应的计划详情列表的商户侧单号信息
13+
* @createTime 2023/11/3 15:51
14+
**/
15+
@Data
16+
@NoArgsConstructor
17+
public class UserSignPlanDetailMerchatNo implements Serializable {
18+
19+
private static final long serialVersionUID = 2668791598158720023L;
20+
21+
/**
22+
* 计划明细序号
23+
*/
24+
@SerializedName("plan_detail_no")
25+
private Integer planDetailNo;
26+
27+
/**
28+
* 商户侧计划明细使用订单号
29+
*/
30+
@SerializedName("merchant_plan_detail_no")
31+
private String merchantPlanDetailNo;
32+
}

0 commit comments

Comments
 (0)