This commit is contained in:
Lemon
2023-08-02 14:21:20 +08:00
parent 568cb5a569
commit 84d7845c4c
3 changed files with 7 additions and 4 deletions

View File

@@ -417,7 +417,7 @@ public class AgentDevService {
return errMsg;
}
// 获取审核编码并返回
long auditId = (long) resultJson.get("auditid");
int auditId = resultJson.getInteger("auditid");
return String.valueOf(auditId);
}
@@ -519,7 +519,7 @@ public class AgentDevService {
+ "&pre_auth_code=" + dto.getPreAuthCode() + "&redirect_uri=" + dto.getRedirectUri() + "&auth_type=" + dto.getAuthType();
} else {
// 2-H5版链接
url = "https://open.weixin.qq.com/wxaopen/safe/bindcomponent?action=bindcomponent&no_scan=1&component_appid=" + dto.getPlatformAppID()
url = "https://open.weixin.qq.com/wxaopen/safe/bindcomponent?action=bindcomponent&no_scan=1&component_appid=" + platformAppid
+ "&pre_auth_code=" + dto.getPreAuthCode() + "&redirect_uri=" + dto.getRedirectUri() + "&auth_type=" + dto.getAuthType();
}
return url;
@@ -576,6 +576,9 @@ public class AgentDevService {
// 有,先删除
redisCache.deleteObject(redisKey);
}
// 删除预缓存码
String preAuthCodeKey = CacheConstants.PLATFORM_PRE_AUTH_CODE + authorizerAppid;
redisCache.deleteObject(preAuthCodeKey);
// 将 authCode 存入缓存
redisCache.setCacheObject(redisKey, authCode, Integer.parseInt(expiresIn), TimeUnit.SECONDS);