Skip to content

Commit ee3a5d3

Browse files
author
wangqi09
committed
feat(cp/oa): add phonenumber field to ContentValue for PhoneNumber control
The WeCom approval API returns PhoneNumber control values as: value.phonenumber = { area: "+62", number: "87827717730" } Without this field, Gson silently drops the value during getApprovalDetail deserialization, causing phone number to be empty when parsing form data. Fixes: ContentValue missing phonenumber field for PhoneNumber control type.
1 parent 5cc8e91 commit ee3a5d3

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ public class ContentValue implements Serializable {
6161
@SerializedName("bank_account")
6262
private BankAccount bankAccount;
6363

64+
@SerializedName("phonenumber")
65+
private PhoneNumber phonenumber;
66+
67+
/**
68+
* Phone number control value: {@code value.phonenumber = { area, number }}.
69+
* e.g. area="+62", number="87827717730"
70+
*/
71+
@Data
72+
public static class PhoneNumber implements Serializable {
73+
private static final long serialVersionUID = 1L;
74+
private String area;
75+
private String number;
76+
}
77+
6478
/**
6579
* The type Date.
6680
*/

0 commit comments

Comments
 (0)