|
@@ -185,12 +185,12 @@ public class QRCode {
|
|
|
* @return
|
|
|
*/
|
|
|
public static String decryptByBase64(String base64) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("/yyyy/MM/dd");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
|
|
|
if (Strings.isNullOrEmpty(base64)) {
|
|
|
return "";
|
|
|
}
|
|
|
- String filePath = programUploadPath + sdf.format(new Date()) + "/" + IdWorker.getId() + ".jpg";
|
|
|
- File path = new File(programUploadPath + sdf.format(new Date()));
|
|
|
+ String filePath = programUploadPath + "/upload/" + sdf.format(new Date()) + "/" + IdWorker.getId() + ".jpg";
|
|
|
+ File path = new File(programUploadPath + "/upload/" + sdf.format(new Date()));
|
|
|
if (!path.exists()) {
|
|
|
path.mkdirs();
|
|
|
}
|
|
@@ -203,12 +203,12 @@ public class QRCode {
|
|
|
return filePath.replace(programUploadPath, "");
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) throws IOException, WriterException {
|
|
|
- Long startTime = System.currentTimeMillis();
|
|
|
- System.out.println("******************************");
|
|
|
- String file = createBase64Img("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx02a4ee296708dfd4&redirect_uri=http%3A%2F%2Fpeiguo.ng.yvanui.com%2Fuser%2FscanEstate.html&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect", "家园互助平台", "巡检扫码");
|
|
|
- Long endTime = System.currentTimeMillis();
|
|
|
- System.out.println(file);
|
|
|
- System.out.println((endTime - startTime) + " |" +(endTime - startTime)/ 1000);
|
|
|
- }
|
|
|
+// public static void main(String[] args) throws IOException, WriterException {
|
|
|
+// Long startTime = System.currentTimeMillis();
|
|
|
+// System.out.println("******************************");
|
|
|
+// String file = createBase64Img("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx02a4ee296708dfd4&redirect_uri=http%3A%2F%2Fpeiguo.ng.yvanui.com%2Fuser%2FscanEstate.html&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect", "家园互助平台", "巡检扫码");
|
|
|
+// Long endTime = System.currentTimeMillis();
|
|
|
+// System.out.println(file);
|
|
|
+// System.out.println((endTime - startTime) + " |" +(endTime - startTime)/ 1000);
|
|
|
+// }
|
|
|
}
|