Skip to content

Commit c887289

Browse files
committed
优化代码
1 parent fe7a470 commit c887289

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/WxCpJedisConfigStorage.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919
*/
2020
public class WxCpJedisConfigStorage implements WxCpConfigStorage {
2121

22-
/* Redis keys here */
22+
/**
23+
* Redis keys here
24+
*/
2325
private static final String ACCESS_TOKEN_KEY = "WX_CP_ACCESS_TOKEN";
2426
private static final String ACCESS_TOKEN_EXPIRES_TIME_KEY = "WX_CP_ACCESS_TOKEN_EXPIRES_TIME";
2527
private static final String JS_API_TICKET_KEY = "WX_CP_JS_API_TICKET";
2628
private static final String JS_API_TICKET_EXPIRES_TIME_KEY = "WX_CP_JS_API_TICKET_EXPIRES_TIME";
27-
/* Redis clients pool */
29+
/**
30+
* Redis clients pool
31+
*/
2832
private final JedisPool jedisPool;
2933
private volatile String corpId;
3034
private volatile String corpSecret;
@@ -196,8 +200,7 @@ public long getExpiresTime() {
196200
String expiresTimeStr = jedis.get(ACCESS_TOKEN_EXPIRES_TIME_KEY);
197201

198202
if (expiresTimeStr != null) {
199-
Long expiresTime = Long.parseLong(expiresTimeStr);
200-
return expiresTime;
203+
return Long.parseLong(expiresTimeStr);
201204
}
202205

203206
return 0L;

0 commit comments

Comments
 (0)