Skip to content

Commit 5758cdc

Browse files
committed
🆕 binarywang#2615 【企业微信】获取企业永久授权码、获取企业授权信息接口补充版本信息返回值
1 parent f62ad6c commit 5758cdc

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,17 @@ public static class Agent implements Serializable {
244244
@SerializedName("expired_time")
245245
private Long expiredTime;
246246

247+
/**
248+
* 是否虚拟版本
249+
*/
250+
@SerializedName("is_virtual_version")
251+
private Boolean isVirtualVersion;
252+
253+
/**
254+
* 是否由互联企业分享安装。详见 <a href='https://developer.work.weixin.qq.com/document/path/93360#24909'>企业互联</a>
255+
*/
256+
@SerializedName("is_shared_from_other_corp")
257+
private Boolean isSharedFromOtherCorp;
247258
}
248259

249260
/**
@@ -290,6 +301,7 @@ public static WxCpTpAuthInfo fromJson(String json) {
290301
return WxCpGsonBuilder.create().fromJson(json, WxCpTpAuthInfo.class);
291302
}
292303

304+
@Override
293305
public String toJson() {
294306
return WxCpGsonBuilder.create().toJson(this);
295307
}

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

+14
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,19 @@ public static class Agent implements Serializable {
240240
*/
241241
@SerializedName("expired_time")
242242
private Long expiredTime;
243+
244+
/**
245+
* 是否虚拟版本
246+
*/
247+
@SerializedName("is_virtual_version")
248+
private Boolean isVirtualVersion;
249+
250+
/**
251+
* 是否由互联企业分享安装。详见 <a href='https://developer.work.weixin.qq.com/document/path/93360#24909'>企业互联</a>
252+
*/
253+
@SerializedName("is_shared_from_other_corp")
254+
private Boolean isSharedFromOtherCorp;
255+
243256
}
244257

245258
/**
@@ -304,6 +317,7 @@ public static WxCpTpPermanentCodeInfo fromJson(String json) {
304317
return WxCpGsonBuilder.create().fromJson(json, WxCpTpPermanentCodeInfo.class);
305318
}
306319

320+
@Override
307321
public String toJson() {
308322
return WxCpGsonBuilder.create().toJson(this);
309323
}

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImplTest.java

+9-3
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ public void testGetPermanentCodeInfo() throws WxErrorException {
201201
" \"edition_name\":\"协同版\",\n" +
202202
" \"app_status\":3,\n" +
203203
" \"user_limit\":200,\n" +
204-
" \"expired_time\":1541990791\n" +
204+
" \"expired_time\":1541990791,\n" +
205+
" \"is_virtual_version\":false,\n" +
206+
" \"is_shared_from_other_corp\":true\n" +
205207
" }\n" +
206208
" ]\n" +
207209
" }\n" +
@@ -295,15 +297,19 @@ public void testGetAuthInfo() throws WxErrorException {
295297
" \"edition_name\":\"协同版\",\n" +
296298
" \"app_status\":3,\n" +
297299
" \"user_limit\":200,\n" +
298-
" \"expired_time\":1541990791\n" +
300+
" \"expired_time\":1541990791,\n" +
301+
" \"is_virtual_version\":false,\n" +
302+
" \"is_shared_from_other_corp\":true\n" +
299303
" },\n" +
300304
" {\n" +
301305
" \"agentid\":1,\n" +
302306
" \"edition_id\":\"RLS65535\",\n" +
303307
" \"edition_name\":\"协同版\",\n" +
304308
" \"app_status\":3,\n" +
305309
" \"user_limit\":200,\n" +
306-
" \"expired_time\":1541990791\n" +
310+
" \"expired_time\":1541990791,\n" +
311+
" \"is_virtual_version\":false,\n" +
312+
" \"is_shared_from_other_corp\":true\n" +
307313
" }\n" +
308314
" ]\n" +
309315
" }\n" +

0 commit comments

Comments
 (0)