|
@@ -128,12 +128,13 @@ public class QRCodeUtils {
|
|
boolean needCompress) throws Exception {
|
|
boolean needCompress) throws Exception {
|
|
BufferedImage image = QRCodeUtils.createImage(content, imgPath,
|
|
BufferedImage image = QRCodeUtils.createImage(content, imgPath,
|
|
needCompress);
|
|
needCompress);
|
|
- destPath = destPath+"/" +DateUtils.datePath();
|
|
|
|
|
|
+ String date = DateUtils.datePath();
|
|
|
|
+ destPath = destPath+"/" + date;
|
|
mkdirs(destPath);
|
|
mkdirs(destPath);
|
|
String file = UUID.randomUUID() + ".jpg";
|
|
String file = UUID.randomUUID() + ".jpg";
|
|
File fileQR = new File(destPath + "/" + file);
|
|
File fileQR = new File(destPath + "/" + file);
|
|
ImageIO.write(image, FORMAT_NAME, fileQR);
|
|
ImageIO.write(image, FORMAT_NAME, fileQR);
|
|
- return fileQR.getAbsolutePath();
|
|
|
|
|
|
+ return "/profile/qrUpload/"+date+"/"+file;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|