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

@@ -263,7 +263,7 @@ public class AgentDevController extends BaseController {
* @param authorizerAppid * @param authorizerAppid
* @return * @return
*/ */
@GetMapping("/releaseProcedure") @GetMapping("/releaseProcedure/{authorizerAppid}")
public RestApiResponse<?> releaseProcedure(@PathVariable("authorizerAppid") String authorizerAppid) { public RestApiResponse<?> releaseProcedure(@PathVariable("authorizerAppid") String authorizerAppid) {
logger.info("发布已通过审核的小程序 params:{}", authorizerAppid); logger.info("发布已通过审核的小程序 params:{}", authorizerAppid);
RestApiResponse<?> response = null; RestApiResponse<?> response = null;

View File

@@ -417,7 +417,7 @@ public class AgentDevService {
return errMsg; return errMsg;
} }
// 获取审核编码并返回 // 获取审核编码并返回
long auditId = (long) resultJson.get("auditid"); int auditId = resultJson.getInteger("auditid");
return String.valueOf(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(); + "&pre_auth_code=" + dto.getPreAuthCode() + "&redirect_uri=" + dto.getRedirectUri() + "&auth_type=" + dto.getAuthType();
} else { } else {
// 2-H5版链接 // 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(); + "&pre_auth_code=" + dto.getPreAuthCode() + "&redirect_uri=" + dto.getRedirectUri() + "&auth_type=" + dto.getAuthType();
} }
return url; return url;
@@ -576,6 +576,9 @@ public class AgentDevService {
// 有,先删除 // 有,先删除
redisCache.deleteObject(redisKey); redisCache.deleteObject(redisKey);
} }
// 删除预缓存码
String preAuthCodeKey = CacheConstants.PLATFORM_PRE_AUTH_CODE + authorizerAppid;
redisCache.deleteObject(preAuthCodeKey);
// 将 authCode 存入缓存 // 将 authCode 存入缓存
redisCache.setCacheObject(redisKey, authCode, Integer.parseInt(expiresIn), TimeUnit.SECONDS); redisCache.setCacheObject(redisKey, authCode, Integer.parseInt(expiresIn), TimeUnit.SECONDS);

View File

@@ -3,7 +3,7 @@ package com.jsowell.pile.dto.agentDev;
import lombok.Data; import lombok.Data;
/** /**
* TODO * 获取审核状态DTO
* *
* @author Lemon * @author Lemon
* @Date 2023/8/1 9:33 * @Date 2023/8/1 9:33