Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private WxCpService wxCpService(WxCpConfigStorage wxCpConfigStorage, WxCpMultiPr
private void configCorp(WxCpDefaultConfigImpl config, WxCpSingleProperties wxCpSingleProperties) {
String corpId = wxCpSingleProperties.getCorpId();
String corpSecret = wxCpSingleProperties.getCorpSecret();
Integer agentId = wxCpSingleProperties.getAgentId();
Long agentId = wxCpSingleProperties.getAgentId();
String token = wxCpSingleProperties.getToken();
String aesKey = wxCpSingleProperties.getAesKey();
// 企业微信,私钥,会话存档路径
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class WxCpSingleProperties implements Serializable {
* <p>使用自建应用 Secret 时,需要填写对应应用的 AgentId。</p>
* <p>使用通讯录同步 Secret 时,无需填写此字段。</p>
*/
private Integer agentId;
private Long agentId;
/**
* 微信企业号应用 EncodingAESKey
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class WxCpProperties {
/**
* 微信企业号应用 ID
*/
private Integer agentId;
private Long agentId;
/**
* 微信企业号应用 EncodingAESKey
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public abstract class AbstractWxCpConfigStorageConfiguration {
protected WxCpDefaultConfigImpl config(WxCpDefaultConfigImpl config, WxCpProperties properties) {
String corpId = properties.getCorpId();
String corpSecret = properties.getCorpSecret();
Integer agentId = properties.getAgentId();
Long agentId = properties.getAgentId();
String token = properties.getToken();
String aesKey = properties.getAesKey();
// 企业微信,私钥,会话存档路径
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface WxCpAgentService {
* @return wx cp agent
* @throws WxErrorException the wx error exception
*/
WxCpAgent get(Integer agentId) throws WxErrorException;
WxCpAgent get(Long agentId) throws WxErrorException;
Comment thread
binarywang marked this conversation as resolved.

/**
* <pre>
Expand Down Expand Up @@ -65,6 +65,6 @@ public interface WxCpAgentService {
* @return admin list
* @throws WxErrorException the wx error exception
*/
WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException;
WxCpTpAdmin getAdminList(Long agentId) throws WxErrorException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ public interface WxCpCorpGroupService {
* @return the list
* @throws WxErrorException the wx error exception
*/
List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
List<WxCpCorpGroupCorp> listAppShareInfo(Long agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface WxCpMenuService {
* @throws WxErrorException the wx error exception
* @see #create(me.chanjar.weixin.common.bean.menu.WxMenu) #create(me.chanjar.weixin.common.bean.menu.WxMenu)
*/
void create(Integer agentId, WxMenu menu) throws WxErrorException;
void create(Long agentId, WxMenu menu) throws WxErrorException;

/**
* <pre>
Expand All @@ -67,7 +67,7 @@ public interface WxCpMenuService {
* @throws WxErrorException the wx error exception
* @see #delete() #delete()
*/
void delete(Integer agentId) throws WxErrorException;
void delete(Long agentId) throws WxErrorException;

/**
* <pre>
Expand Down Expand Up @@ -96,5 +96,5 @@ public interface WxCpMenuService {
* @throws WxErrorException the wx error exception
* @see #get() #get()
*/
WxMenu get(Integer agentId) throws WxErrorException;
WxMenu get(Long agentId) throws WxErrorException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public interface WxCpOAuth2Service {
* @throws WxErrorException 异常
* @see #getUserInfo(String) #getUserInfo(String)
*/
WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException;
WxCpOauth2UserInfo getUserInfo(Long agentId, String code) throws WxErrorException;

/**
* 获取家校访问用户身份
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class WxCpAgentServiceImpl implements WxCpAgentService {
private final WxCpService mainService;

@Override
public WxCpAgent get(Integer agentId) throws WxErrorException {
public WxCpAgent get(Long agentId) throws WxErrorException {
Comment thread
binarywang marked this conversation as resolved.
if (agentId == null) {
throw new IllegalArgumentException("缺少agentid参数");
}
Expand Down Expand Up @@ -67,7 +67,7 @@ public List<WxCpAgent> list() throws WxErrorException {
}

@Override
public WxCpTpAdmin getAdminList(Integer agentId) throws WxErrorException {
public WxCpTpAdmin getAdminList(Long agentId) throws WxErrorException {
if (agentId == null) {
throw new IllegalArgumentException("缺少agentid参数");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
private final WxCpService cpService;

@Override
public List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId,
public List<WxCpCorpGroupCorp> listAppShareInfo(Long agentId, Integer businessType, String corpId,
Integer limit, String cursor) throws WxErrorException {
final String url = this.cpService.getWxCpConfigStorage().getApiUrl(LIST_SHARE_APP_INFO);
JsonObject jsonObject = new JsonObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void create(WxMenu menu) throws WxErrorException {
}

@Override
public void create(Integer agentId, WxMenu menu) throws WxErrorException {
public void create(Long agentId, WxMenu menu) throws WxErrorException {
String url = String.format(this.mainService.getWxCpConfigStorage().getApiUrl(MENU_CREATE), agentId);
this.mainService.post(url, menu.toJson());
}
Expand All @@ -38,7 +38,7 @@ public void delete() throws WxErrorException {
}

@Override
public void delete(Integer agentId) throws WxErrorException {
public void delete(Long agentId) throws WxErrorException {
String url = String.format(this.mainService.getWxCpConfigStorage().getApiUrl(MENU_DELETE), agentId);
this.mainService.get(url, null);
}
Expand All @@ -49,7 +49,7 @@ public WxMenu get() throws WxErrorException {
}

@Override
public WxMenu get(Integer agentId) throws WxErrorException {
public WxMenu get(Long agentId) throws WxErrorException {
String url = String.format(this.mainService.getWxCpConfigStorage().getApiUrl(MENU_GET), agentId);
try {
String resultContent = this.mainService.get(url, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class WxCpMessageServiceImpl implements WxCpMessageService {

@Override
public WxCpMessageSendResult send(WxCpMessage message) throws WxErrorException {
Integer agentId = message.getAgentId();
Long agentId = message.getAgentId();
if (null == agentId) {
message.setAgentId(this.cpService.getWxCpConfigStorage().getAgentId());
}
Expand All @@ -38,7 +38,7 @@ public WxCpMessageSendStatistics getStatistics(int timeType) throws WxErrorExcep

@Override
public WxCpLinkedCorpMessageSendResult sendLinkedCorpMessage(WxCpLinkedCorpMessage message) throws WxErrorException {
Integer agentId = message.getAgentId();
Long agentId = message.getAgentId();
if (null == agentId) {
message.setAgentId(this.cpService.getWxCpConfigStorage().getAgentId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public WxCpOauth2UserInfo getUserInfo(String code) throws WxErrorException {
}

@Override
public WxCpOauth2UserInfo getUserInfo(Integer agentId, String code) throws WxErrorException {
public WxCpOauth2UserInfo getUserInfo(Long agentId, String code) throws WxErrorException {
String responseText =
this.mainService.get(String.format(this.mainService.getWxCpConfigStorage().getApiUrl(GET_USER_INFO), code,
agentId), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class WxCpTaskCardServiceImpl implements WxCpTaskCardService {

@Override
public void update(List<String> userIds, String taskId, String replaceName) throws WxErrorException {
Integer agentId = this.mainService.getWxCpConfigStorage().getAgentId();
Long agentId = this.mainService.getWxCpConfigStorage().getAgentId();

Map<String, Object> data = new HashMap<>(4);
data.put("userids", userIds);
Expand All @@ -45,7 +45,7 @@ public void update(List<String> userIds, String taskId, String replaceName) thro
public void updateTemplateCardButton(List<String> userIds, List<Integer> partyIds,
List<Integer> tagIds, Integer atAll,
String responseCode, String replaceName) throws WxErrorException {
Integer agentId = this.mainService.getWxCpConfigStorage().getAgentId();
Long agentId = this.mainService.getWxCpConfigStorage().getAgentId();
Map<String, Object> data = new HashMap<>(7);
data.put("userids", userIds);
data.put("partyids", partyIds);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class WxCpAgentJsapiSignature implements Serializable {

private String corpid;

private Integer agentid;
private Long agentid;

private long timestamp;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ public class WxCpLinkedCorpMessage implements Serializable {
/**
* 企业应用的id,整型。可在应用的设置页面查看
*/
private Integer agentId;
private Long agentId;

public void setAgentId(long agentId) {
this.agentId = Long.valueOf(agentId);
}
private String msgType;
/**
* 消息内容,最长不超过2048个字节
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public class WxCpMessage implements Serializable {
/**
* 企业应用的id,整型。企业内部开发,可在应用的设置页面查看;第三方服务商,可通过接口 获取企业授权信息 获取该参数值
*/
private Integer agentId;
private Long agentId;

public void setAgentId(long agentId) {
Comment thread
binarywang marked this conversation as resolved.
this.agentId = Long.valueOf(agentId);
}
/**
* 消息类型
* 文本消息: text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ public class WxCpSchoolContactMessage implements Serializable {
* 企业应用的id,整型。可在应用的设置页面查看
*/
@SerializedName("agentid")
private Integer agentId;
private Long agentId;

public void setAgentId(long agentId) {
this.agentId = Long.valueOf(agentId);
}

/**
* 消息内容,最长不超过2048个字节(支持id转译)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public abstract class BaseBuilder<T> {
/**
* The Agent id.
*/
protected Integer agentId;
protected Long agentId;
/**
* The To user.
*/
Expand All @@ -39,11 +39,15 @@ public abstract class BaseBuilder<T> {
* @param agentId the agent id
* @return the t
*/
public T agentId(Integer agentId) {
public T agentId(Long agentId) {
this.agentId = agentId;
return (T) this;
}

public T agentId(long agentId) {
return this.agentId(Long.valueOf(agentId));
}

/**
* To user t.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public interface WxCpConfigStorage {
*
* @return the agent id
*/
Integer getAgentId();
Long getAgentId();
Comment thread
binarywang marked this conversation as resolved.
Comment thread
binarywang marked this conversation as resolved.

/**
* Gets token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public AbstractWxCpInRedisConfigImpl(@NonNull WxRedisOps redisOps, String keyPre
* @param agentId 应用 agentId
*/
@Override
public void setAgentId(Integer agentId) {
public void setAgentId(Long agentId) {
super.setAgentId(agentId);
String ukey;
if (agentId != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class WxCpDefaultConfigImpl implements WxCpConfigStorage, Serializable {
/**
* The Agent id.
*/
protected volatile Integer agentId;
protected volatile Long agentId;
Comment thread
binarywang marked this conversation as resolved.
/**
* The Jsapi ticket lock.
*/
Expand Down Expand Up @@ -320,7 +320,7 @@ public void setAesKey(String aesKey) {
}

@Override
public Integer getAgentId() {
public Long getAgentId() {
return this.agentId;
}

Expand All @@ -329,10 +329,14 @@ public Integer getAgentId() {
*
* @param agentId the agent id
*/
public void setAgentId(Integer agentId) {
public void setAgentId(Long agentId) {
this.agentId = agentId;
}

public void setAgentId(long agentId) {
this.setAgentId(Long.valueOf(agentId));
}

/**
* 设置企微会话存档路径.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class WxCpRedisConfigImpl implements WxCpConfigStorage {
private volatile String corpSecret;
private volatile String token;
private volatile String aesKey;
private volatile Integer agentId;
private volatile Long agentId;
private volatile String msgAuditPriKey;
private volatile String msgAuditLibPath;
private volatile String oauth2redirectUri;
Expand Down Expand Up @@ -312,7 +312,7 @@ public void setCorpSecret(String corpSecret) {
}

@Override
public Integer getAgentId() {
public Long getAgentId() {
return this.agentId;
}

Expand All @@ -321,7 +321,7 @@ public Integer getAgentId() {
*
* @param agentId the agent id
*/
public void setAgentId(Integer agentId) {
public void setAgentId(Long agentId) {
this.agentId = agentId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public WxCpConfigStorage getWxCpConfigStorage() {
return config;
}
};
config.setAgentId(1);
config.setAgentId(1L);
service.setWxCpConfigStorage(config);
RequestExecutor<Object, Object> re = mock(RequestExecutor.class);

Expand Down
Loading