Skip to content

Commit 5c1018e

Browse files
committed
fix: 支持长整型企业微信应用ID
1 parent 8c5d917 commit 5c1018e

35 files changed

Lines changed: 108 additions & 71 deletions

spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/configuration/services/AbstractWxCpConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private WxCpService wxCpService(WxCpConfigStorage wxCpConfigStorage, WxCpMultiPr
125125
private void configCorp(WxCpDefaultConfigImpl config, WxCpSingleProperties wxCpSingleProperties) {
126126
String corpId = wxCpSingleProperties.getCorpId();
127127
String corpSecret = wxCpSingleProperties.getCorpSecret();
128-
Integer agentId = wxCpSingleProperties.getAgentId();
128+
Long agentId = wxCpSingleProperties.getAgentId();
129129
String token = wxCpSingleProperties.getToken();
130130
String aesKey = wxCpSingleProperties.getAesKey();
131131
// 企业微信,私钥,会话存档路径

spring-boot-starters/wx-java-cp-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpSingleProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class WxCpSingleProperties implements Serializable {
5252
* <p>使用自建应用 Secret 时,需要填写对应应用的 AgentId。</p>
5353
* <p>使用通讯录同步 Secret 时,无需填写此字段。</p>
5454
*/
55-
private Integer agentId;
55+
private Long agentId;
5656
/**
5757
* 微信企业号应用 EncodingAESKey
5858
*/

spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/properties/WxCpProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class WxCpProperties {
3434
/**
3535
* 微信企业号应用 ID
3636
*/
37-
private Integer agentId;
37+
private Long agentId;
3838
/**
3939
* 微信企业号应用 EncodingAESKey
4040
*/

spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public abstract class AbstractWxCpConfigStorageConfiguration {
1515
protected WxCpDefaultConfigImpl config(WxCpDefaultConfigImpl config, WxCpProperties properties) {
1616
String corpId = properties.getCorpId();
1717
String corpSecret = properties.getCorpSecret();
18-
Integer agentId = properties.getAgentId();
18+
Long agentId = properties.getAgentId();
1919
String token = properties.getToken();
2020
String aesKey = properties.getAesKey();
2121
// 企业微信,私钥,会话存档路径

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpAgentService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface WxCpAgentService {
2727
* @return wx cp agent
2828
* @throws WxErrorException the wx error exception
2929
*/
30-
WxCpAgent get(Integer agentId) throws WxErrorException;
30+
WxCpAgent get(Long agentId) throws WxErrorException;
3131

3232
/**
3333
* <pre>
@@ -65,6 +65,6 @@ public interface WxCpAgentService {
6565
* @return admin list
6666
* @throws WxErrorException the wx error exception
6767
*/
68-
WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException;
68+
WxCpTpAdmin getAdminList(Long agentId) throws WxErrorException;
6969

7070
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpCorpGroupService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ public interface WxCpCorpGroupService {
2323
* @return the list
2424
* @throws WxErrorException the wx error exception
2525
*/
26-
List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
26+
List<WxCpCorpGroupCorp> listAppShareInfo(Long agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
2727
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMenuService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public interface WxCpMenuService {
4040
* @throws WxErrorException the wx error exception
4141
* @see #create(me.chanjar.weixin.common.bean.menu.WxMenu) #create(me.chanjar.weixin.common.bean.menu.WxMenu)
4242
*/
43-
void create(Integer agentId, WxMenu menu) throws WxErrorException;
43+
void create(Long agentId, WxMenu menu) throws WxErrorException;
4444

4545
/**
4646
* <pre>
@@ -67,7 +67,7 @@ public interface WxCpMenuService {
6767
* @throws WxErrorException the wx error exception
6868
* @see #delete() #delete()
6969
*/
70-
void delete(Integer agentId) throws WxErrorException;
70+
void delete(Long agentId) throws WxErrorException;
7171

7272
/**
7373
* <pre>
@@ -96,5 +96,5 @@ public interface WxCpMenuService {
9696
* @throws WxErrorException the wx error exception
9797
* @see #get() #get()
9898
*/
99-
WxMenu get(Integer agentId) throws WxErrorException;
99+
WxMenu get(Long agentId) throws WxErrorException;
100100
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOAuth2Service.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public interface WxCpOAuth2Service {
8585
* @throws WxErrorException 异常
8686
* @see #getUserInfo(String) #getUserInfo(String)
8787
*/
88-
WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException;
88+
WxCpOauth2UserInfo getUserInfo(Long agentId, String code) throws WxErrorException;
8989

9090
/**
9191
* 获取家校访问用户身份

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpAgentServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class WxCpAgentServiceImpl implements WxCpAgentService {
3434
private final WxCpService mainService;
3535

3636
@Override
37-
public WxCpAgent get(Integer agentId) throws WxErrorException {
37+
public WxCpAgent get(Long agentId) throws WxErrorException {
3838
if (agentId == null) {
3939
throw new IllegalArgumentException("缺少agentid参数");
4040
}
@@ -67,7 +67,7 @@ public List<WxCpAgent> list() throws WxErrorException {
6767
}
6868

6969
@Override
70-
public WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException {
70+
public WxCpTpAdmin getAdminList(Long agentId) throws WxErrorException {
7171
if (agentId == null) {
7272
throw new IllegalArgumentException("缺少agentid参数");
7373
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl/WxCpCorpGroupServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
2525
private final WxCpService cpService;
2626

2727
@Override
28-
public List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId,
28+
public List<WxCpCorpGroupCorp> listAppShareInfo(Long agentId, Integer businessType, String corpId,
2929
Integer limit, String cursor) throws WxErrorException {
3030
final String url = this.cpService.getWxCpConfigStorage().getApiUrl(LIST_SHARE_APP_INFO);
3131
JsonObject jsonObject = new JsonObject();

0 commit comments

Comments
 (0)