Browse Source

新增内蒙会话内容存档

anderx 4 months ago
parent
commit
29e3f4d751

+ 4 - 2
src/main/java/com/kede/wechat/service/impl/ConversationContentServiceImpl.java

@@ -409,6 +409,8 @@ public class ConversationContentServiceImpl extends BaseMybatisDao<ChatMsgUserMa
                 logger.debug("getAccessToken有缓存从缓存获取");
                 logger.debug("getAccessToken有缓存从缓存获取");
                 accessToken = accessMap.get("accessToken");
                 accessToken = accessMap.get("accessToken");
                 Long expireDate = Long.valueOf(accessMap.get("expireDate"));
                 Long expireDate = Long.valueOf(accessMap.get("expireDate"));
+                System.out.println(accessToken);
+                System.out.println(System.currentTimeMillis());
                 if (expireDate < System.currentTimeMillis()){
                 if (expireDate < System.currentTimeMillis()){
                     logger.debug("getAccessToken缓存已过期从接口获取");
                     logger.debug("getAccessToken缓存已过期从接口获取");
                     Map<String, String> map = getAccessMap(corpId, secret);
                     Map<String, String> map = getAccessMap(corpId, secret);
@@ -488,7 +490,7 @@ public class ConversationContentServiceImpl extends BaseMybatisDao<ChatMsgUserMa
             corpId = hnCorpId;
             corpId = hnCorpId;
             appSecret = hnAppSecret;
             appSecret = hnAppSecret;
             //获取redis缓存数据
             //获取redis缓存数据
-            Map<String,String> accessMap = (Map<String, String>) redisTemplate.opsForValue().get("ADDRESS_BOOK_ACCESS_TOKEN");
+            Map<String,String> accessMap = (Map<String, String>) redisTemplate.opsForValue().get("APP_ACCESS_TOKEN");
             if (accessMap == null){
             if (accessMap == null){
                 logger.debug("APP_ACCESS_TOKEN无缓存从接口获取");
                 logger.debug("APP_ACCESS_TOKEN无缓存从接口获取");
                 Map<String, String> map = getAccessMap(corpId,appSecret);
                 Map<String, String> map = getAccessMap(corpId,appSecret);
@@ -511,7 +513,7 @@ public class ConversationContentServiceImpl extends BaseMybatisDao<ChatMsgUserMa
             corpId = nmCorpid;
             corpId = nmCorpid;
             appSecret = nmAppSecret;
             appSecret = nmAppSecret;
             //获取redis缓存数据
             //获取redis缓存数据
-            Map<String,String> accessMap = (Map<String, String>) redisTemplate.opsForValue().get("NM_ADDRESS_BOOK_ACCESS_TOKEN");
+            Map<String,String> accessMap = (Map<String, String>) redisTemplate.opsForValue().get("NM_APP_ACCESS_TOKEN");
             if (accessMap == null){
             if (accessMap == null){
                 logger.debug("NM_APP_ACCESS_TOKEN无缓存从接口获取");
                 logger.debug("NM_APP_ACCESS_TOKEN无缓存从接口获取");
                 Map<String, String> map = getAccessMap(corpId,appSecret);
                 Map<String, String> map = getAccessMap(corpId,appSecret);