Skip to content

Commit 172b964

Browse files
authored
🎨 #3626 【微信支付】创建代金券批次接口新增字段,包括背景色、卡包跳转目标、小程序 appid 与 path等
1 parent b3b8c27 commit 172b964

File tree

3 files changed

+73
-1
lines changed

3 files changed

+73
-1
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/marketing/FavorStocksCreateRequest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.github.binarywang.wxpay.bean.marketing;
22

33
import com.github.binarywang.wxpay.bean.marketing.enums.BackgroundColorEnum;
4+
import com.github.binarywang.wxpay.bean.marketing.enums.JumpTargetEnum;
45
import com.github.binarywang.wxpay.bean.marketing.enums.StockTypeEnum;
56
import com.github.binarywang.wxpay.bean.marketing.enums.TradeTypeEnum;
67
import com.google.gson.annotations.SerializedName;
@@ -392,6 +393,24 @@ public static class PatternInfo implements Serializable {
392393
*/
393394
@SerializedName(value = "coupon_image")
394395
private String couponImage;
396+
397+
/**
398+
* 卡包跳转目标
399+
*/
400+
@SerializedName("jump_target")
401+
private JumpTargetEnum jumpTarget;
402+
403+
/**
404+
* 小程序appid
405+
*/
406+
@SerializedName("mini_program_appid")
407+
private String miniProgramAppid;
408+
409+
/**
410+
* 小程序path
411+
*/
412+
@SerializedName("mini_program_path")
413+
private String miniProgramPath;
395414
}
396415

397416
@Data

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/marketing/enums/BackgroundColorEnum.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ public enum BackgroundColorEnum {
5252
*/
5353
COLOR080("COLOR080", "#EE903C"),
5454

55+
/**
56+
* 颜色 #F08500
57+
*/
58+
COLOR081("COLOR081", "#F08500"),
59+
60+
/**
61+
* 颜色 #A9D92D
62+
*/
63+
COLOR082("COLOR082", "#A9D92D"),
64+
5565
/**
5666
* 颜色 #DD6549
5767
*/
@@ -61,8 +71,17 @@ public enum BackgroundColorEnum {
6171
* 颜色 #CC463D
6272
*/
6373
COLOR100("COLOR100", "#CC463D"),
64-
;
6574

75+
/**
76+
* 颜色 #CF3E36
77+
*/
78+
COLOR101("COLOR101", "#CF3E36"),
79+
80+
/**
81+
* 颜色 #5E6671
82+
*/
83+
COLOR102("COLOR102", "#5E6671"),
84+
;
6685
/**
6786
* 色值
6887
*/
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package com.github.binarywang.wxpay.bean.marketing.enums;
2+
3+
import lombok.AllArgsConstructor;
4+
import lombok.Getter;
5+
6+
/**
7+
* 卡包跳转目标
8+
*
9+
* @author wangerwei
10+
*/
11+
@Getter
12+
@AllArgsConstructor
13+
public enum JumpTargetEnum {
14+
15+
/**
16+
* PAYMENT_CODE:点击“立即使用”跳转至微信支付付款码
17+
*/
18+
PAYMENT_CODE("PAYMENT_CODE"),
19+
20+
/**
21+
* MINI_PROGRAM:点击“立即使用”跳转至配置的商家小程序(需要指定小程序appid和path)
22+
*/
23+
MINI_PROGRAM("MINI_PROGRAM"),
24+
25+
/**
26+
* DEFAULT_PAGE:点击“立即使用”跳转至默认页面
27+
*/
28+
DEFAULT_PAGE("DEFAULT_PAGE");
29+
30+
/**
31+
* 批次类型
32+
*/
33+
private final String value;
34+
}

0 commit comments

Comments
 (0)