This commit is contained in:
wangw 2025-10-20 18:04:19 +08:00
parent 0390cc4576
commit ae84ca9f15
1 changed files with 4 additions and 4 deletions

View File

@ -64,8 +64,8 @@ public class AcAccountUtil {
scene.put("scene_str", userId.toString());
actionInfo.put("scene", scene);
bodyJson.put("action_info", actionInfo);
String resp = HttpUtil.post(StrUtil.format("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token={}", accessToken), bodyJson);
String url = StrUtil.format("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token={}", accessToken);
String resp = HttpUtil.post(url, bodyJson);
/**
* {
* "ticket": "gQH47joAAAAAAAAAASxodHRwOi8vd2VpeGlu...",
@ -75,7 +75,7 @@ public class AcAccountUtil {
*/
JSONObject respInfo = JSONObject.parseObject(resp);
if (respInfo.get("url") == null) {
log.error("创建临时二维码失败,发送参数: {}, 响应内容: {}", bodyJson, resp);
log.error("创建临时二维码失败,发送参数:url:{}, {}, 响应内容: {}", url, bodyJson, resp);
return "";
}
return respInfo.get("url").toString();
@ -83,7 +83,7 @@ public class AcAccountUtil {
public String getAccessToken() {
String accessToken = Convert.toStr(redisService.get("wx:ac:AccessToken"));
String accessToken = redisService.get("wx:ac:AccessToken").toString();
if (StrUtil.isNotEmpty(accessToken)) {
return accessToken;
}