From b27c25fe7907f21956cc34919dfece66aeb3d9f7 Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Mon, 29 Sep 2025 11:53:42 +0800
Subject: [PATCH] 优化 增加航线模块
---
ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java b/ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java
index 9eda8a0..3f49e23 100644
--- a/ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java
+++ b/ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java
@@ -12,6 +12,7 @@
import org.apache.commons.compress.utils.IOUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
+
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.io.BufferedReader;
@@ -102,7 +103,7 @@
public JSONObject verifyAuthorization() {
try {
JSONObject data = new JSONObject();
- String savedDir = System.getProperty("user.dir") + "\\ardLicense";
+ String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
File dir = new File(savedDir);
if (!dir.exists()) { //如果不存在
boolean dr = dir.mkdirs(); //创建目录
@@ -118,7 +119,7 @@
return data;
}
}
- File LicenseFile = new File(savedDir + "/license.cpy");//获取授权文件
+ File LicenseFile = new File(savedDir + File.separator + "license.cpy");//获取授权文件
if (LicenseFile.exists()) {
AuthorizeInfo info = parseFiles(LicenseFile);//解析授权文件
if (info != null) {
@@ -157,7 +158,7 @@
public JSONObject getAuthorizationInfo() {
try {
JSONObject data = new JSONObject();
- String savedDir = System.getProperty("user.dir") + "\\ardLicense";
+ String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
File dir = new File(savedDir);
if (!dir.exists()) { //如果不存在
boolean dr = dir.mkdirs(); //创建目录
@@ -173,7 +174,7 @@
return data;
}
}
- File LicenseFile = new File(savedDir + "/license.cpy");//获取授权文件
+ File LicenseFile = new File(savedDir + File.separator + "license.cpy");//获取授权文件
if (LicenseFile.exists()) {
AuthorizeInfo info = parseFiles(LicenseFile);//解析授权文件
if (info != null) {
@@ -212,8 +213,8 @@
*/
@Override
public JSONObject makeTempLicense() {
- String savedDir = System.getProperty("user.dir") + "\\ardLicense";
- String tempLicenseDate = AuthorizeUtil.makeTempLicense(savedDir + "\\license.cpy");
+ String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
+ String tempLicenseDate = AuthorizeUtil.makeTempLicense(savedDir + File.separator + "license.cpy");
JSONObject data = new JSONObject();
data.put("Type", "makeTempLicense");
data.put("Message", tempLicenseDate);
@@ -250,7 +251,7 @@
public JSONObject uploadLicense(MultipartFile file) {
try {
String fileRealName = file.getOriginalFilename(); //获得原始文件名;
- String savedDir = System.getProperty("user.dir") + "\\ardLicense";
+ String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
File dir = new File(savedDir);
if (!dir.exists()) { //如果不存在
boolean dr = dir.mkdirs(); //创建目录
@@ -263,7 +264,7 @@
}
JSONObject data = new JSONObject();
data.put("Type", "uploadLicenseFile");
- data.put("Message", "Dir:" + savedDir);
+ data.put("Message", savedDir);
return data;
} catch (Exception ex) {
log.error("获取机器码异常:" + ex.getMessage());
--
Gitblit v1.9.3