Browse Source

图片调整

training
汤建军 1 year ago
parent
commit
6eaa830f8d
  1. 3
      blade-biz-common/src/main/java/org/springblade/common/utils/FileUtil.java
  2. 4
      blade-biz-common/src/main/java/org/springblade/common/utils/QRCodeUtil.java

3
blade-biz-common/src/main/java/org/springblade/common/utils/FileUtil.java

@ -57,8 +57,7 @@ public class FileUtil extends TimerTask {
*/ */
public static void handleSignPictureZip(List<String> urls, String type, String code, String consignee) { public static void handleSignPictureZip(List<String> urls, String type, String code, String consignee) {
//将图片下载至本地中 //将图片下载至本地中
// String imgPath = CommonConstant.SYSTEMFILEPATH; String savePath = CommonConstant.SYSTEMFILEPATH+"reservationZip/"+code;
String savePath = "D:/Test" +"/"+ code;
String imgPath = savePath; String imgPath = savePath;
// 打开连接 // 打开连接

4
blade-biz-common/src/main/java/org/springblade/common/utils/QRCodeUtil.java

@ -80,7 +80,7 @@ public class QRCodeUtil {
public static String createCodeToFile(String content) { public static String createCodeToFile(String content) {
try { try {
String imgPath = CommonConstant.SYSTEMFILEPATH; String imgPath = CommonConstant.SYSTEMFILEPATH+"qrCodeImg/";
File codeImgFileSaveDir = new File(imgPath); File codeImgFileSaveDir = new File(imgPath);
//1. 使用UUID重新生成文件名,防止文件名称重复造成文件覆盖 //1. 使用UUID重新生成文件名,防止文件名称重复造成文件覆盖
String fileName = UUID.randomUUID() + "." +FileFormat; String fileName = UUID.randomUUID() + "." +FileFormat;
@ -108,7 +108,7 @@ public class QRCodeUtil {
public static String createCodeToFileType(String content) { public static String createCodeToFileType(String content) {
try { try {
//getResource("/")等同于到resource文件夹下 //getResource("/")等同于到resource文件夹下
String imgPath = CommonConstant.SYSTEMFILEPATH; String imgPath = CommonConstant.SYSTEMFILEPATH+"qrCodeImg/";
File codeImgFileSaveDir = new File(imgPath); File codeImgFileSaveDir = new File(imgPath);
//1. 使用UUID重新生成文件名,防止文件名称重复造成文件覆盖 //1. 使用UUID重新生成文件名,防止文件名称重复造成文件覆盖
String fileName = UUID.randomUUID() + "." +FileFormat; String fileName = UUID.randomUUID() + "." +FileFormat;

Loading…
Cancel
Save