修复二维码上传阿里云功能

This commit is contained in:
wen 2021-11-17 17:50:41 +08:00
parent b3b5344209
commit ed929ce114
2 changed files with 5 additions and 5 deletions

View File

@ -52,7 +52,7 @@ public class QrImgUtils {
// 创建OSSClient实例
OSSClient ossClient = new OSSClient(environment.getProperty("oss.endpoint"), environment.getProperty("oss.access-key"), environment.getProperty("oss.secret-key"));
// 上传文件流
ossClient.putObject(environment.getProperty("oss.bucket-name"), xhpcTerminal.getPileSerialNumber() + "/" + finallyImgFileName, new File(environment.getProperty("destPath") + "\\" + finallyImgFileName));
ossClient.putObject(environment.getProperty("oss.bucket-name"), xhpcTerminal.getPileSerialNumber() + "/" + finallyImgFileName, new File(environment.getProperty("destPath") + "/" + finallyImgFileName));
ossClient.shutdown();
//5.将放在阿里云上的生成的图片的路径和图片所对应的终端的id放入数据库xhpc_img表中

View File

@ -26,10 +26,10 @@ spring:
#二维码Logo图片获取位置
imgPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/logo.png"
imgPath: "/www/wwwroot/www.scxhua.cn/xhpc-charging-stion/logo.png"
#生成的二维码存放位置:
destPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/"
destPath: "/www/wwwroot/www.scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs"
#生成的最终完整图片的存放位置:
fullImgDestPath: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/"
fullImgDestPath: "/www/wwwroot/www.scxhua.cn/xhpc-charging-stion/XiaoHuaFullImgs/"
#底图图片存放位置:
bottomImg: "/www/wwwroot/scxhua.cn/xhpc-charging-stion/BottomImg.png"
bottomImg: "/www/wwwroot/www.scxhua.cn/xhpc-charging-stion/BottomImg.png"