u
This commit is contained in:
@@ -50,8 +50,6 @@ public class WeixinSuiteProxy {
|
||||
* 应用ID
|
||||
* @param suiteSecret
|
||||
* 应用secret
|
||||
* @param ticketStorager
|
||||
* 应用ticket存储器(用于读取)
|
||||
* @param tokenStorager
|
||||
* 应用token存储器
|
||||
* @throws WeixinException
|
||||
@@ -115,7 +113,7 @@ public class WeixinSuiteProxy {
|
||||
* 授权方corpid
|
||||
* @return 企业号token
|
||||
*/
|
||||
public TokenHolder crateTokenHolder(String authCorpid) {
|
||||
public TokenHolder createTokenHolder(String authCorpid) {
|
||||
return suiteApi.createTokenHolder(authCorpid);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,23 @@ public class WeixinQyAccount extends WeixinAccount {
|
||||
|
||||
private static final long serialVersionUID = 3689999353867189585L;
|
||||
|
||||
/**
|
||||
* 应用套件id
|
||||
*/
|
||||
private String suiteId;
|
||||
/**
|
||||
* 应用套件secret
|
||||
*/
|
||||
private String suiteSecret;
|
||||
/**
|
||||
* 第三方提供商secret(企业号登陆)
|
||||
*/
|
||||
private String providerSecret;
|
||||
/**
|
||||
* 消息服务secret(企业号聊天)
|
||||
*/
|
||||
private String chatSecret;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param corpid
|
||||
@@ -48,23 +65,6 @@ public class WeixinQyAccount extends WeixinAccount {
|
||||
this.chatSecret = chatSecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用套件id
|
||||
*/
|
||||
private String suiteId;
|
||||
/**
|
||||
* 应用套件secret
|
||||
*/
|
||||
private String suiteSecret;
|
||||
/**
|
||||
* 第三方提供商secret(企业号登陆)
|
||||
*/
|
||||
private String providerSecret;
|
||||
/**
|
||||
* 消息服务secret(企业号聊天)
|
||||
*/
|
||||
private String chatSecret;
|
||||
|
||||
public String getSuiteId() {
|
||||
return suiteId;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class SuiteTicketHolder {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找ticket
|
||||
* 获取ticket
|
||||
*
|
||||
* @return
|
||||
* @throws WeixinException
|
||||
@@ -42,6 +42,10 @@ public class SuiteTicketHolder {
|
||||
* @return
|
||||
*/
|
||||
public String getCacheKey() {
|
||||
return getCacheKey0(suiteId);
|
||||
}
|
||||
|
||||
private String getCacheKey0(String suiteId) {
|
||||
return String.format("qy_suite_ticket_%s", suiteId);
|
||||
}
|
||||
|
||||
@@ -55,7 +59,7 @@ public class SuiteTicketHolder {
|
||||
throws WeixinException {
|
||||
Token token = new Token(suiteTicket.getSuiteTicket());
|
||||
token.setExpiresIn(-1);
|
||||
tokenStorager.caching(getCacheKey(), token);
|
||||
tokenStorager.caching(getCacheKey0(suiteTicket.getSuiteId()), token);
|
||||
}
|
||||
|
||||
public String getSuiteId() {
|
||||
|
||||
Reference in New Issue
Block a user