From bc2d286516d7554f94404ee13ce9b90cf28da7d1 Mon Sep 17 00:00:00 2001 From: xhxu Date: Sun, 15 May 2022 16:04:45 +0800 Subject: [PATCH] =?UTF-8?q?//add=20=E8=8E=B7=E5=8F=96=E6=8A=96=E9=9F=B3?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../douyin/miniapp/api/impl/TtMaQrcodeServiceImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/douyin/miniapp/api/impl/TtMaQrcodeServiceImpl.java b/mallinkService/src/main/java/com/iformall/douyin/miniapp/api/impl/TtMaQrcodeServiceImpl.java index 729ae49aa..8e58aa3fc 100644 --- a/mallinkService/src/main/java/com/iformall/douyin/miniapp/api/impl/TtMaQrcodeServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/douyin/miniapp/api/impl/TtMaQrcodeServiceImpl.java @@ -19,8 +19,15 @@ public class TtMaQrcodeServiceImpl implements TtMaQrcodeService { @Override public File createTtaCode(String appname, String path, int width) throws WxErrorException { + TtMaQrcode ttMaQrcode = new TtMaQrcode(appname, path, width); + try { + String accessToken = ttMaService.getAccessToken(false); + ttMaQrcode.setAccess_token(accessToken); + } catch (Exception e) { + e.printStackTrace(); + } final TtQrcodeRequestExecutor executor = new TtQrcodeRequestExecutor(this.ttMaService.getRequestHttp()); - return this.ttMaService.execute(executor, GET_TTACODE_URL, new TtMaQrcode(appname,path, width)); + return this.ttMaService.execute(executor, GET_TTACODE_URL, ttMaQrcode); } }