|
|
@@ -365,15 +365,26 @@ public class AuthAccessTokenServiceImpl extends ServiceImpl<AuthAccessTokenMappe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //二维码参数
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
|
param.put("page", "pages/welcome/welcome");
|
|
|
- param.put("scene", "s=" + map.get("openid")); //
|
|
|
+ param.put("scene", "s=" + map.get("openid"));
|
|
|
param.put("check_path", false);
|
|
|
+ //生成二维码接口地址
|
|
|
String url = config.getUnlimitedQRCode() + accessToken;
|
|
|
- String filePath = this.createDirByPath("qr_code") + java.util.UUID.randomUUID().toString() + ".png";
|
|
|
- ResponseResultVO<String> responseResultVO = HttpUtils.postReturnFile(url, param, filePath);
|
|
|
- System.out.println("getWxQrCode:" + filePath);
|
|
|
- return ResponseResultUtil.success(responseResultVO);
|
|
|
+ //文件名称
|
|
|
+ String fileName=java.util.UUID.randomUUID().toString() + ".png";
|
|
|
+ //文件相对路径 - 返回
|
|
|
+ String relativePath="/qr_code/"+ fileName;
|
|
|
+ //文件绝对路径 - 写
|
|
|
+ String absolutelyPath = this.createDirByPath("qr_code") + fileName;
|
|
|
+ ResponseResultVO<String> responseResultVO = HttpUtils.postReturnFile(url, param, absolutelyPath);
|
|
|
+ if(responseResultVO.getCode()==ResponseCodeEnum.SUCCESS.getCode()){
|
|
|
+ return ResponseResultUtil.success(relativePath);
|
|
|
+ }else{
|
|
|
+ return responseResultVO;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|