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); } }