mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 22:11:40 +08:00
优化代码
This commit is contained in:
parent
fe7a4705b7
commit
c887289518
@ -19,12 +19,16 @@ import java.io.File;
|
||||
*/
|
||||
public class WxCpJedisConfigStorage implements WxCpConfigStorage {
|
||||
|
||||
/* Redis keys here */
|
||||
/**
|
||||
* Redis keys here
|
||||
*/
|
||||
private static final String ACCESS_TOKEN_KEY = "WX_CP_ACCESS_TOKEN";
|
||||
private static final String ACCESS_TOKEN_EXPIRES_TIME_KEY = "WX_CP_ACCESS_TOKEN_EXPIRES_TIME";
|
||||
private static final String JS_API_TICKET_KEY = "WX_CP_JS_API_TICKET";
|
||||
private static final String JS_API_TICKET_EXPIRES_TIME_KEY = "WX_CP_JS_API_TICKET_EXPIRES_TIME";
|
||||
/* Redis clients pool */
|
||||
/**
|
||||
* Redis clients pool
|
||||
*/
|
||||
private final JedisPool jedisPool;
|
||||
private volatile String corpId;
|
||||
private volatile String corpSecret;
|
||||
@ -196,8 +200,7 @@ public class WxCpJedisConfigStorage implements WxCpConfigStorage {
|
||||
String expiresTimeStr = jedis.get(ACCESS_TOKEN_EXPIRES_TIME_KEY);
|
||||
|
||||
if (expiresTimeStr != null) {
|
||||
Long expiresTime = Long.parseLong(expiresTimeStr);
|
||||
return expiresTime;
|
||||
return Long.parseLong(expiresTimeStr);
|
||||
}
|
||||
|
||||
return 0L;
|
||||
|
Loading…
Reference in New Issue
Block a user