update 查询支付回调记录加缓存

This commit is contained in:
2023-05-30 16:20:03 +08:00
parent 6e8b06b433
commit 53bb941e7c
6 changed files with 58 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
@@ -78,7 +79,7 @@ public class WxAppletRemoteService {
// secret = properties.getAppSecret();
//查询token是否存在
String redisKey = "AccessToken_" + appid;
String redisKey = CacheConstants.ACCESS_TOKEN + appid;
// 使用缓存先查询AccessToken是否存在
String accessToken = redisCache.getCacheObject(redisKey);
// 存在直接返回不存在重新获取AccessToken