1 package com.foxinmy.weixin4j.token;
2
3 import com.foxinmy.weixin4j.cache.CacheStorager;
4 import com.foxinmy.weixin4j.model.Token;
5
6
7
8
9
10
11
12
13
14 public class PerTicketManager extends TicketManager {
15
16 private final String authAppId;
17
18 public PerTicketManager(String authAppId, String thirdId,
19 String thirdSecret, CacheStorager<Token> cacheStorager) {
20 super(thirdId, thirdSecret, cacheStorager);
21 this.authAppId = authAppId;
22 }
23
24
25
26
27
28
29 @Override
30 public String getCacheKey() {
31 return String.format("%sthird_party_percode_ticket_%s_%s",
32 TokenCreator.CACHEKEY_PREFIX, getThirdId(), authAppId);
33 }
34
35 public String getAuthAppId() {
36 return authAppId;
37 }
38 }