@@ -18,30 +18,43 @@ public class WxCpHrEmployeeFieldInfo implements Serializable {
1818 private static final long serialVersionUID = 2593693598671765396L ;
1919
2020 /**
21- * 字段key .
21+ * 字段ID .
2222 */
23- @ SerializedName ("field_key" )
24- private String fieldKey ;
25-
26- /**
27- * 字段英文名称.
28- */
29- @ SerializedName ("field_en_name" )
30- private String fieldEnName ;
23+ @ SerializedName ("fieldid" )
24+ private Integer fieldId ;
3125
3226 /**
33- * 字段中文名称 .
27+ * 字段名称 .
3428 */
35- @ SerializedName ("field_zh_name " )
36- private String fieldZhName ;
29+ @ SerializedName ("field_name " )
30+ private String fieldName ;
3731
3832 /**
3933 * 字段类型.
40- * 具体取值参见 {@link WxCpHrFieldType}
34+ * 1: 文本
35+ * 2: 单选/多选
36+ * 3: 日期
4137 */
4238 @ SerializedName ("field_type" )
4339 private Integer fieldType ;
4440
41+ /**
42+ * 是否必填.
43+ */
44+ @ SerializedName ("is_must" )
45+ private Boolean isMust ;
46+
47+ /**
48+ * 值类型.
49+ * 1: 字符串
50+ * 2: uint64
51+ * 3: uint32
52+ * 4: int64
53+ * 5: mobile
54+ */
55+ @ SerializedName ("value_type" )
56+ private Integer valueType ;
57+
4558 /**
4659 * 获取字段类型枚举.
4760 *
@@ -52,22 +65,79 @@ public WxCpHrFieldType getFieldTypeEnum() {
5265 }
5366
5467 /**
55- * 是否系统字段.
56- * 0: 否
57- * 1: 是
68+ * 选项列表(单选/多选字段专用).
69+ */
70+ @ SerializedName ("option_list" )
71+ private List <Option > optionList ;
72+
73+ /**
74+ * 选项.
75+ */
76+ @ Data
77+ @ NoArgsConstructor
78+ public static class Option implements Serializable {
79+ private static final long serialVersionUID = 1L ;
80+
81+ /**
82+ * 选项ID.
83+ */
84+ @ SerializedName ("id" )
85+ private Integer id ;
86+
87+ /**
88+ * 选项值.
89+ */
90+ @ SerializedName ("value" )
91+ private String value ;
92+ }
93+
94+ // ===== 以下字段为兼容旧版本 =====
95+
96+ /**
97+ * 字段key(兼容旧版本,实际API不返回此字段).
98+ * @deprecated 使用 fieldId 代替
5899 */
100+ @ Deprecated
101+ @ SerializedName ("field_key" )
102+ private String fieldKey ;
103+
104+ /**
105+ * 字段英文名称(兼容旧版本,实际API不返回此字段).
106+ * @deprecated 此字段在API响应中不存在
107+ */
108+ @ Deprecated
109+ @ SerializedName ("field_en_name" )
110+ private String fieldEnName ;
111+
112+ /**
113+ * 字段中文名称(兼容旧版本).
114+ * @deprecated 使用 fieldName 代替
115+ */
116+ @ Deprecated
117+ @ SerializedName ("field_zh_name" )
118+ private String fieldZhName ;
119+
120+ /**
121+ * 是否系统字段(兼容旧版本,实际API不返回此字段).
122+ * @deprecated 此字段在API响应中不存在
123+ */
124+ @ Deprecated
59125 @ SerializedName ("is_sys" )
60126 private Integer isSys ;
61127
62128 /**
63- * 字段详情.
129+ * 字段详情(兼容旧版本).
130+ * @deprecated 使用 optionList 直接访问选项列表
64131 */
132+ @ Deprecated
65133 @ SerializedName ("field_detail" )
66134 private FieldDetail fieldDetail ;
67135
68136 /**
69- * 字段详情.
137+ * 字段详情(兼容旧版本).
138+ * @deprecated 使用 optionList 代替
70139 */
140+ @ Deprecated
71141 @ Data
72142 @ NoArgsConstructor
73143 public static class FieldDetail implements Serializable {
@@ -77,15 +147,17 @@ public static class FieldDetail implements Serializable {
77147 * 选项列表(单选/多选字段专用).
78148 */
79149 @ SerializedName ("option_list" )
80- private List <Option > optionList ;
150+ private List <OldOption > optionList ;
81151 }
82152
83153 /**
84- * 选项.
154+ * 旧版选项(兼容旧版本).
155+ * @deprecated 使用 Option 代替
85156 */
157+ @ Deprecated
86158 @ Data
87159 @ NoArgsConstructor
88- public static class Option implements Serializable {
160+ public static class OldOption implements Serializable {
89161 private static final long serialVersionUID = 1L ;
90162
91163 /**
0 commit comments