项目适配瀚高

This commit is contained in:
2025-12-25 19:20:05 +08:00
parent ceae2f0039
commit d12617f2a6
36 changed files with 590 additions and 404 deletions

View File

@@ -9,8 +9,8 @@ import org.springframework.stereotype.Component;
* @author ltgk
*/
@Component
@ConfigurationProperties(prefix = "ruoyi")
public class RuoYiConfig
@ConfigurationProperties(prefix = "smart-fishing-port")
public class SmartFishingPortConfig
{
/** 项目名称 */
private String name;
@@ -67,7 +67,7 @@ public class RuoYiConfig
public void setProfile(String profile)
{
RuoYiConfig.profile = profile;
SmartFishingPortConfig.profile = profile;
}
public static boolean isAddressEnabled()
@@ -77,7 +77,7 @@ public class RuoYiConfig
public void setAddressEnabled(boolean addressEnabled)
{
RuoYiConfig.addressEnabled = addressEnabled;
SmartFishingPortConfig.addressEnabled = addressEnabled;
}
public static String getCaptchaType() {
@@ -85,7 +85,7 @@ public class RuoYiConfig
}
public void setCaptchaType(String captchaType) {
RuoYiConfig.captchaType = captchaType;
SmartFishingPortConfig.captchaType = captchaType;
}
/**

View File

@@ -1,6 +1,6 @@
package com.ltgk.smartFishingPort.common.utils.file;
import com.ltgk.smartFishingPort.common.config.RuoYiConfig;
import com.ltgk.smartFishingPort.common.config.SmartFishingPortConfig;
import com.ltgk.smartFishingPort.common.constant.Constants;
import com.ltgk.smartFishingPort.common.exception.file.FileNameLengthLimitExceededException;
import com.ltgk.smartFishingPort.common.exception.file.FileSizeLimitExceededException;
@@ -37,7 +37,7 @@ public class FileUploadUtils
/**
* 默认上传的地址
*/
private static String defaultBaseDir = RuoYiConfig.getProfile();
private static String defaultBaseDir = SmartFishingPortConfig.getProfile();
public static void setDefaultBaseDir(String defaultBaseDir)
{
@@ -171,7 +171,7 @@ public class FileUploadUtils
public static final String getPathFileName(String uploadDir, String fileName) throws IOException
{
int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
int dirLastIndex = SmartFishingPortConfig.getProfile().length() + 1;
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
}

View File

@@ -1,6 +1,6 @@
package com.ltgk.smartFishingPort.common.utils.file;
import com.ltgk.smartFishingPort.common.config.RuoYiConfig;
import com.ltgk.smartFishingPort.common.config.SmartFishingPortConfig;
import com.ltgk.smartFishingPort.common.constant.Constants;
import com.ltgk.smartFishingPort.common.utils.DateUtils;
import com.ltgk.smartFishingPort.common.utils.StringUtils;
@@ -69,7 +69,7 @@ public class FileUtils
*/
public static String writeImportBytes(byte[] data) throws IOException
{
return writeBytes(data, RuoYiConfig.getImportPath());
return writeBytes(data, SmartFishingPortConfig.getImportPath());
}
/**

View File

@@ -1,6 +1,6 @@
package com.ltgk.smartFishingPort.common.utils.file;
import com.ltgk.smartFishingPort.common.config.RuoYiConfig;
import com.ltgk.smartFishingPort.common.config.SmartFishingPortConfig;
import com.ltgk.smartFishingPort.common.constant.Constants;
import com.ltgk.smartFishingPort.common.utils.StringUtils;
import org.apache.poi.util.IOUtils;
@@ -80,7 +80,7 @@ public class ImageUtils
else
{
// 本机地址
String localPath = RuoYiConfig.getProfile();
String localPath = SmartFishingPortConfig.getProfile();
String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX);
in = new FileInputStream(downloadPath);
}

View File

@@ -2,7 +2,7 @@ package com.ltgk.smartFishingPort.common.utils.ip;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.ltgk.smartFishingPort.common.config.RuoYiConfig;
import com.ltgk.smartFishingPort.common.config.SmartFishingPortConfig;
import com.ltgk.smartFishingPort.common.constant.Constants;
import com.ltgk.smartFishingPort.common.utils.StringUtils;
import com.ltgk.smartFishingPort.common.utils.http.HttpUtils;
@@ -31,7 +31,7 @@ public class AddressUtils
{
return "内网IP";
}
if (RuoYiConfig.isAddressEnabled())
if (SmartFishingPortConfig.isAddressEnabled())
{
try
{

View File

@@ -4,7 +4,7 @@ import com.ltgk.smartFishingPort.common.annotation.Excel;
import com.ltgk.smartFishingPort.common.annotation.Excel.ColumnType;
import com.ltgk.smartFishingPort.common.annotation.Excel.Type;
import com.ltgk.smartFishingPort.common.annotation.Excels;
import com.ltgk.smartFishingPort.common.config.RuoYiConfig;
import com.ltgk.smartFishingPort.common.config.SmartFishingPortConfig;
import com.ltgk.smartFishingPort.common.core.domain.AjaxResult;
import com.ltgk.smartFishingPort.common.core.text.Convert;
import com.ltgk.smartFishingPort.common.exception.UtilException;
@@ -1438,7 +1438,7 @@ public class ExcelUtil<T>
*/
public String getAbsoluteFile(String filename)
{
String downloadPath = RuoYiConfig.getDownloadPath() + filename;
String downloadPath = SmartFishingPortConfig.getDownloadPath() + filename;
File desc = new File(downloadPath);
if (!desc.getParentFile().exists())
{