Skip to content

Commit 42d92c0

Browse files
committed
🎨 规范一些字段命名
1 parent 09100e6 commit 42d92c0

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpAuthInfo.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
/**
1111
* 服务商模式获取授权信息
1212
*
13-
* @author Daniel Qian
13+
* @author yuanqixun
1414
*/
1515
@Getter
1616
@Setter
1717
public class WxCpTpAuthInfo extends WxCpBaseResp {
18-
1918
private static final long serialVersionUID = -5028321625140879571L;
2019

2120
/**
@@ -92,7 +91,7 @@ public static class AuthCorpInfo {
9291
* 授权企业在微工作台(原企业号)的二维码,可用于关注微工作台
9392
*/
9493
@SerializedName("corp_wxqrcode")
95-
private String corpWxqrcode;
94+
private String corpWxQrcode;
9695

9796
@SerializedName("corp_scale")
9897
private String corpScale;
@@ -119,15 +118,15 @@ public static class AuthInfo {
119118
* 授权的应用信息,注意是一个数组,但仅旧的多应用套件授权时会返回多个agent,对新的单应用授权,永远只返回一个agent
120119
*/
121120
@SerializedName("agent")
122-
private List<Agent> agent;
121+
private List<Agent> agents;
123122

124123
}
125124

126125
@Getter
127126
@Setter
128127
public static class Agent {
129128
@SerializedName("agentid")
130-
private Integer agentid;
129+
private Integer agentId;
131130

132131
@SerializedName("name")
133132
private String name;
@@ -172,23 +171,22 @@ public static class Privilege {
172171
private Integer level;
173172

174173
@SerializedName("allow_party")
175-
private List<Integer> allowParty;
174+
private List<Integer> allowParties;
176175

177176
@SerializedName("allow_user")
178-
private List<String> allowUser;
177+
private List<String> allowUsers;
179178

180179
@SerializedName("allow_tag")
181-
private List<Integer> allowTag;
180+
private List<Integer> allowTags;
182181

183182
@SerializedName("extra_party")
184-
private List<Integer> extraParty;
183+
private List<Integer> extraParties;
185184

186185
@SerializedName("extra_user")
187-
private List<String> extraUser;
186+
private List<String> extraUsers;
188187

189188
@SerializedName("extra_tag")
190-
private List<Integer> extraTag;
191-
189+
private List<Integer> extraTags;
192190

193191
}
194192

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* 服务商模式获取永久授权码信息
1212
*
13-
* @author Daniel Qian
13+
* @author yunaqixun
1414
*/
1515
@Getter
1616
@Setter
@@ -22,7 +22,7 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp {
2222
private String accessToken;
2323

2424
@SerializedName("expires_in")
25-
private Long ExpiresIn;
25+
private Long expiresIn;
2626

2727
@SerializedName("permanent_code")
2828
private String permanentCode;
@@ -92,7 +92,7 @@ public static class AuthCorpInfo {
9292
* 授权企业在微工作台(原企业号)的二维码,可用于关注微工作台
9393
*/
9494
@SerializedName("corp_wxqrcode")
95-
private String corpWxqrcode;
95+
private String corpWxQrcode;
9696

9797
@SerializedName("corp_scale")
9898
private String corpScale;
@@ -119,15 +119,15 @@ public static class AuthInfo {
119119
* 授权的应用信息,注意是一个数组,但仅旧的多应用套件授权时会返回多个agent,对新的单应用授权,永远只返回一个agent
120120
*/
121121
@SerializedName("agent")
122-
private List<Agent> agent;
122+
private List<Agent> agents;
123123

124124
}
125125

126126
@Getter
127127
@Setter
128128
public static class Agent {
129129
@SerializedName("agentid")
130-
private Integer agentid;
130+
private Integer agentId;
131131

132132
@SerializedName("name")
133133
private String name;
@@ -160,7 +160,7 @@ public static class Agent {
160160
@Setter
161161
public static class AuthUserInfo {
162162
@SerializedName("userid")
163-
private String userid;
163+
private String userId;
164164

165165
@SerializedName("name")
166166
private String name;
@@ -188,27 +188,26 @@ public static class Privilege {
188188
private Integer level;
189189

190190
@SerializedName("allow_party")
191-
private List<Integer> allowParty;
191+
private List<Integer> allowParties;
192192

193193
@SerializedName("allow_user")
194-
private List<String> allowUser;
194+
private List<String> allowUsers;
195195

196196
@SerializedName("allow_tag")
197-
private List<Integer> allowTag;
197+
private List<Integer> allowTags;
198198

199199
@SerializedName("extra_party")
200-
private List<Integer> extraParty;
200+
private List<Integer> extraParties;
201201

202202
@SerializedName("extra_user")
203-
private List<String> extraUser;
203+
private List<String> extraUsers;
204204

205205
@SerializedName("extra_tag")
206-
private List<Integer> extraTag;
206+
private List<Integer> extraTags;
207207

208208

209209
}
210210

211-
212211
public static WxCpTpPermanentCodeInfo fromJson(String json) {
213212
return WxCpGsonBuilder.create().fromJson(json, WxCpTpPermanentCodeInfo.class);
214213
}

0 commit comments

Comments
 (0)