Commit 987ce55f authored by huangjie's avatar huangjie

Merge branch 'dev20230707' of http://192.168.60.201/root/dsk-operate-sys into dev20230707

parents 8f207bbe b735753a
package com.dsk.web.controller.business; package com.dsk.web.controller.business;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.core.controller.BaseController; import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.BusinessFileVo; import com.dsk.common.core.domain.entity.BusinessFileVo;
...@@ -62,7 +62,7 @@ public class BusinessFileController extends BaseController { ...@@ -62,7 +62,7 @@ public class BusinessFileController extends BaseController {
public TableDataInfo getAllFiles(BusinessIdDto filePath) { public TableDataInfo getAllFiles(BusinessIdDto filePath) {
startPage(); startPage();
List<BusinessFileVo> allFiles; List<BusinessFileVo> allFiles;
if(StringUtils.isNumeric(filePath.getFilePath())) filePath.setFilePath(RuoYiConfig.getProfile() + filePath.getFilePath()); if(StringUtils.isNumeric(filePath.getFilePath())) filePath.setFilePath(ShuZhiHuaConfig.getProfile() + filePath.getFilePath());
allFiles = FileUtils.getAllFiles(filePath.getFilePath()); allFiles = FileUtils.getAllFiles(filePath.getFilePath());
//模糊查询文件 //模糊查询文件
if(StringUtils.isNotEmpty(filePath.getKeyword())){ if(StringUtils.isNotEmpty(filePath.getKeyword())){
...@@ -87,7 +87,7 @@ public class BusinessFileController extends BaseController { ...@@ -87,7 +87,7 @@ public class BusinessFileController extends BaseController {
String filename = file.getOriginalFilename(); String filename = file.getOriginalFilename();
String businessFileName = request.getHeader("FilePath"); String businessFileName = request.getHeader("FilePath");
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath() + businessFileName + "/"; String filePath = ShuZhiHuaConfig.getUploadPath() + businessFileName + "/";
//校验是否上传同名文件 //校验是否上传同名文件
File newFile = new File(filePath); File newFile = new File(filePath);
......
...@@ -12,7 +12,7 @@ import org.springframework.util.FastByteArrayOutputStream; ...@@ -12,7 +12,7 @@ import org.springframework.util.FastByteArrayOutputStream;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.google.code.kaptcha.Producer; import com.google.code.kaptcha.Producer;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.constant.CacheConstants; import com.dsk.common.constant.CacheConstants;
import com.dsk.common.constant.Constants; import com.dsk.common.constant.Constants;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
...@@ -62,7 +62,7 @@ public class CaptchaController ...@@ -62,7 +62,7 @@ public class CaptchaController
BufferedImage image = null; BufferedImage image = null;
// 生成验证码 // 生成验证码
String captchaType = RuoYiConfig.getCaptchaType(); String captchaType = ShuZhiHuaConfig.getCaptchaType();
if ("math".equals(captchaType)) if ("math".equals(captchaType))
{ {
String capText = captchaProducerMath.createText(); String capText = captchaProducerMath.createText();
......
...@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.constant.Constants; import com.dsk.common.constant.Constants;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
...@@ -53,7 +53,7 @@ public class CommonController ...@@ -53,7 +53,7 @@ public class CommonController
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
} }
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String filePath = RuoYiConfig.getDownloadPath() + fileName; String filePath = ShuZhiHuaConfig.getDownloadPath() + fileName;
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, realFileName); FileUtils.setAttachmentResponseHeader(response, realFileName);
...@@ -78,7 +78,7 @@ public class CommonController ...@@ -78,7 +78,7 @@ public class CommonController
try try
{ {
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = ShuZhiHuaConfig.getUploadPath();
// 上传并返回新文件名称 // 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file); String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName; String url = serverConfig.getUrl() + fileName;
...@@ -104,7 +104,7 @@ public class CommonController ...@@ -104,7 +104,7 @@ public class CommonController
try try
{ {
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = ShuZhiHuaConfig.getUploadPath();
List<String> urls = new ArrayList<String>(); List<String> urls = new ArrayList<String>();
List<String> fileNames = new ArrayList<String>(); List<String> fileNames = new ArrayList<String>();
List<String> newFileNames = new ArrayList<String>(); List<String> newFileNames = new ArrayList<String>();
...@@ -146,7 +146,7 @@ public class CommonController ...@@ -146,7 +146,7 @@ public class CommonController
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource)); throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
} }
// 本地资源路径 // 本地资源路径
String localPath = RuoYiConfig.getProfile(); String localPath = ShuZhiHuaConfig.getProfile();
// 数据库资源地址 // 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX); String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称 // 下载名称
......
...@@ -3,7 +3,7 @@ package com.dsk.web.controller.system; ...@@ -3,7 +3,7 @@ package com.dsk.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
/** /**
...@@ -16,7 +16,7 @@ public class SysIndexController ...@@ -16,7 +16,7 @@ public class SysIndexController
{ {
/** 系统基础配置 */ /** 系统基础配置 */
@Autowired @Autowired
private RuoYiConfig ruoyiConfig; private ShuZhiHuaConfig shuZhiHuaConfig;
/** /**
* 访问首页,提示语 * 访问首页,提示语
...@@ -24,6 +24,6 @@ public class SysIndexController ...@@ -24,6 +24,6 @@ public class SysIndexController
@RequestMapping("/") @RequestMapping("/")
public String index() public String index()
{ {
return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion()); return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", shuZhiHuaConfig.getName(), shuZhiHuaConfig.getVersion());
} }
} }
...@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.dsk.common.annotation.Log; import com.dsk.common.annotation.Log;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.core.controller.BaseController; import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.SysUser; import com.dsk.common.core.domain.entity.SysUser;
...@@ -125,7 +125,7 @@ public class SysProfileController extends BaseController ...@@ -125,7 +125,7 @@ public class SysProfileController extends BaseController
if (!file.isEmpty()) if (!file.isEmpty())
{ {
LoginUser loginUser = getLoginUser(); LoginUser loginUser = getLoginUser();
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION); String avatar = FileUploadUtils.upload(ShuZhiHuaConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION);
if (userService.updateUserAvatar(loginUser.getUsername(), avatar)) if (userService.updateUserAvatar(loginUser.getUsername(), avatar))
{ {
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
......
...@@ -6,7 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -6,7 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
...@@ -32,7 +32,7 @@ public class SwaggerConfig ...@@ -32,7 +32,7 @@ public class SwaggerConfig
{ {
/** 系统基础配置 */ /** 系统基础配置 */
@Autowired @Autowired
private RuoYiConfig ruoyiConfig; private ShuZhiHuaConfig shuZhiHuaConfig;
/** 是否开启swagger */ /** 是否开启swagger */
@Value("${swagger.enabled}") @Value("${swagger.enabled}")
...@@ -58,7 +58,7 @@ public class SwaggerConfig ...@@ -58,7 +58,7 @@ public class SwaggerConfig
// 扫描所有有注解的api,用这种方式更灵活 // 扫描所有有注解的api,用这种方式更灵活
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// 扫描指定包中的swagger注解 // 扫描指定包中的swagger注解
// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger")) // .apis(RequestHandlerSelectors.basePackage("com.dsk.project.tool.swagger"))
// 扫描所有 .apis(RequestHandlerSelectors.any()) // 扫描所有 .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any()) .paths(PathSelectors.any())
.build() .build()
...@@ -117,9 +117,9 @@ public class SwaggerConfig ...@@ -117,9 +117,9 @@ public class SwaggerConfig
// 描述 // 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息 // 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null)) .contact(new Contact(shuZhiHuaConfig.getName(), null, null))
// 版本 // 版本
.version("版本号:" + ruoyiConfig.getVersion()) .version("版本号:" + shuZhiHuaConfig.getVersion())
.build(); .build();
} }
} }
# 项目相关配置 # 项目相关配置
ruoyi: shuzhihua:
# 名称 # 名称
name: RuoYi name: ShuZhiHua
# 版本 # 版本
version: 3.8.5 version: 3.8.5
# 版权年份 # 版权年份
copyrightYear: 2023 copyrightYear: 2023
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/server/dsk-operate-sys/uploadPath) # 文件路径 示例( Windows配置D:/dsk/uploadPath,Linux配置 /home/server/dsk-operate-sys/uploadPath)
# profile: D:/dsk-operate-sys/uploadPath/ # profile: D:/dsk-operate-sys/uploadPath/
profile: /home/server/dsk-operate-sys/uploadPath/ profile: /home/server/dsk-operate-sys/uploadPath/
# 获取ip地址开关 # 获取ip地址开关
...@@ -37,7 +37,7 @@ server: ...@@ -37,7 +37,7 @@ server:
# 日志配置 # 日志配置
logging: logging:
level: level:
com.ruoyi: debug com.dsk: debug
org.springframework: warn org.springframework: warn
# 用户配置 # 用户配置
...@@ -97,7 +97,7 @@ spring: ...@@ -97,7 +97,7 @@ spring:
allow: allow:
url-pattern: /druid/* url-pattern: /druid/*
# 控制台管理用户名和密码 # 控制台管理用户名和密码
login-username: ruoyi login-username: dskadmin
login-password: 123456 login-password: 123456
filter: filter:
stat: stat:
......
# 项目相关配置 # 项目相关配置
ruoyi: shuzhihua:
# 名称 # 名称
name: RuoYi name: ShuZhiHua
# 版本 # 版本
version: 3.8.5 version: 3.8.5
# 版权年份 # 版权年份
copyrightYear: 2023 copyrightYear: 2023
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/server/dsk-operate-sys/uploadPath) # 文件路径 示例( Windows配置D:/dsk/uploadPath,Linux配置 /home/server/dsk-operate-sys/uploadPath)
# profile: D:/dsk-operate-sys/uploadPath/ # profile: D:/dsk-operate-sys/uploadPath/
profile: /home/server/dsk-operate-sys/uploadPath/ profile: /home/server/dsk-operate-sys/uploadPath/
# 获取ip地址开关 # 获取ip地址开关
...@@ -37,7 +37,7 @@ server: ...@@ -37,7 +37,7 @@ server:
# 日志配置 # 日志配置
logging: logging:
level: level:
com.ruoyi: debug com.dsk: info
org.springframework: warn org.springframework: warn
# 用户配置 # 用户配置
...@@ -97,7 +97,7 @@ spring: ...@@ -97,7 +97,7 @@ spring:
allow: allow:
url-pattern: /druid/* url-pattern: /druid/*
# 控制台管理用户名和密码 # 控制台管理用户名和密码
login-username: ruoyi login-username: dskadmin
login-password: 123456 login-password: 123456
filter: filter:
stat: stat:
......
# 项目相关配置 # 项目相关配置
ruoyi: shuzhihua:
# 名称 # 名称
name: RuoYi name: ShuZhiHua
# 版本 # 版本
version: 3.8.5 version: 3.8.5
# 版权年份 # 版权年份
copyrightYear: 2023 copyrightYear: 2023
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/server/dsk-operate-sys/uploadPath) # 文件路径 示例( Windows配置D:/dsk/uploadPath,Linux配置 /home/server/dsk-operate-sys/uploadPath)
# profile: D:/dsk-operate-sys/uploadPath/ # profile: D:/dsk-operate-sys/uploadPath/
profile: /home/server/dsk-operate-sys/uploadPath/ profile: /home/server/dsk-operate-sys/uploadPath/
# 获取ip地址开关 # 获取ip地址开关
...@@ -37,7 +37,7 @@ server: ...@@ -37,7 +37,7 @@ server:
# 日志配置 # 日志配置
logging: logging:
level: level:
com.ruoyi: debug com.dsk: debug
org.springframework: warn org.springframework: warn
# 用户配置 # 用户配置
...@@ -97,7 +97,7 @@ spring: ...@@ -97,7 +97,7 @@ spring:
allow: allow:
url-pattern: /druid/* url-pattern: /druid/*
# 控制台管理用户名和密码 # 控制台管理用户名和密码
login-username: ruoyi login-username: dskadmin
login-password: 123456 login-password: 123456
filter: filter:
stat: stat:
......
Application Version: ${ruoyi.version} Application Version: ${shuzhihua.version}
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
...@@ -9,8 +9,8 @@ import org.springframework.stereotype.Component; ...@@ -9,8 +9,8 @@ import org.springframework.stereotype.Component;
* @author dsk * @author dsk
*/ */
@Component @Component
@ConfigurationProperties(prefix = "ruoyi") @ConfigurationProperties(prefix = "shuzhihua")
public class RuoYiConfig public class ShuZhiHuaConfig
{ {
/** 项目名称 */ /** 项目名称 */
private String name; private String name;
...@@ -80,7 +80,7 @@ public class RuoYiConfig ...@@ -80,7 +80,7 @@ public class RuoYiConfig
public void setProfile(String profile) public void setProfile(String profile)
{ {
RuoYiConfig.profile = profile; ShuZhiHuaConfig.profile = profile;
} }
public static boolean isAddressEnabled() public static boolean isAddressEnabled()
...@@ -90,7 +90,7 @@ public class RuoYiConfig ...@@ -90,7 +90,7 @@ public class RuoYiConfig
public void setAddressEnabled(boolean addressEnabled) public void setAddressEnabled(boolean addressEnabled)
{ {
RuoYiConfig.addressEnabled = addressEnabled; ShuZhiHuaConfig.addressEnabled = addressEnabled;
} }
public static String getCaptchaType() { public static String getCaptchaType() {
...@@ -98,7 +98,7 @@ public class RuoYiConfig ...@@ -98,7 +98,7 @@ public class RuoYiConfig
} }
public void setCaptchaType(String captchaType) { public void setCaptchaType(String captchaType) {
RuoYiConfig.captchaType = captchaType; ShuZhiHuaConfig.captchaType = captchaType;
} }
/** /**
......
...@@ -132,11 +132,11 @@ public class Constants ...@@ -132,11 +132,11 @@ public class Constants
/** /**
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
*/ */
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" }; public static final String[] JOB_WHITELIST_STR = { "com.dsk" };
/** /**
* 定时任务违规的字符 * 定时任务违规的字符
*/ */
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" }; "org.springframework", "org.apache", "com.dsk.common.utils.file", "com.dsk.common.config" };
} }
...@@ -13,7 +13,7 @@ public class FileTypeUtils ...@@ -13,7 +13,7 @@ public class FileTypeUtils
/** /**
* 获取文件类型 * 获取文件类型
* <p> * <p>
* 例如: ruoyi.txt, 返回: txt * 例如: dsk.txt, 返回: txt
* *
* @param file 文件名 * @param file 文件名
* @return 后缀(不含".") * @return 后缀(不含".")
...@@ -30,7 +30,7 @@ public class FileTypeUtils ...@@ -30,7 +30,7 @@ public class FileTypeUtils
/** /**
* 获取文件类型 * 获取文件类型
* <p> * <p>
* 例如: ruoyi.txt, 返回: txt * 例如: dsk.txt, 返回: txt
* *
* @param fileName 文件名 * @param fileName 文件名
* @return 后缀(不含".") * @return 后缀(不含".")
......
package com.dsk.common.utils.file; package com.dsk.common.utils.file;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.constant.Constants; import com.dsk.common.constant.Constants;
import com.dsk.common.exception.file.FileNameLengthLimitExceededException; import com.dsk.common.exception.file.FileNameLengthLimitExceededException;
import com.dsk.common.exception.file.FileSizeLimitExceededException; import com.dsk.common.exception.file.FileSizeLimitExceededException;
...@@ -36,7 +36,7 @@ public class FileUploadUtils ...@@ -36,7 +36,7 @@ public class FileUploadUtils
/** /**
* 默认上传的地址 * 默认上传的地址
*/ */
private static String defaultBaseDir = RuoYiConfig.getProfile(); private static String defaultBaseDir = ShuZhiHuaConfig.getProfile();
public static void setDefaultBaseDir(String defaultBaseDir) public static void setDefaultBaseDir(String defaultBaseDir)
{ {
...@@ -145,7 +145,7 @@ public class FileUploadUtils ...@@ -145,7 +145,7 @@ public class FileUploadUtils
public static final String getPathFileName(String uploadDir, String fileName) throws IOException public static final String getPathFileName(String uploadDir, String fileName) throws IOException
{ {
int dirLastIndex = RuoYiConfig.getProfile().length() + 1; int dirLastIndex = ShuZhiHuaConfig.getProfile().length() + 1;
String currentDir = StringUtils.substring(uploadDir, dirLastIndex); String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
} }
......
package com.dsk.common.utils.file; package com.dsk.common.utils.file;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.core.domain.entity.BusinessFileVo; import com.dsk.common.core.domain.entity.BusinessFileVo;
import com.dsk.common.exception.base.BaseException; import com.dsk.common.exception.base.BaseException;
import com.dsk.common.utils.DateUtils; import com.dsk.common.utils.DateUtils;
...@@ -127,7 +127,7 @@ public class FileUtils ...@@ -127,7 +127,7 @@ public class FileUtils
*/ */
public static String writeImportBytes(byte[] data) throws IOException public static String writeImportBytes(byte[] data) throws IOException
{ {
return writeBytes(data, RuoYiConfig.getImportPath()); return writeBytes(data, ShuZhiHuaConfig.getImportPath());
} }
/** /**
...@@ -584,7 +584,7 @@ public class FileUtils ...@@ -584,7 +584,7 @@ public class FileUtils
} }
/** /**
* 获取文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi.png * 获取文件名称 /profile/upload/2022/04/16/dsk.png -- dsk.png
* *
* @param fileName 路径名称 * @param fileName 路径名称
* @return 没有文件路径的名称 * @return 没有文件路径的名称
...@@ -602,7 +602,7 @@ public class FileUtils ...@@ -602,7 +602,7 @@ public class FileUtils
} }
/** /**
* 获取不带后缀文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi * 获取不带后缀文件名称 /profile/upload/2022/04/16/dsk.png -- dsk
* *
* @param fileName 路径名称 * @param fileName 路径名称
* @return 没有文件路径和后缀的名称 * @return 没有文件路径和后缀的名称
......
...@@ -12,7 +12,7 @@ import com.dsk.common.utils.StringUtils; ...@@ -12,7 +12,7 @@ import com.dsk.common.utils.StringUtils;
import org.apache.poi.util.IOUtils; import org.apache.poi.util.IOUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
/** /**
* 图片处理工具类 * 图片处理工具类
...@@ -80,7 +80,7 @@ public class ImageUtils ...@@ -80,7 +80,7 @@ public class ImageUtils
else else
{ {
// 本机地址 // 本机地址
String localPath = RuoYiConfig.getProfile(); String localPath = ShuZhiHuaConfig.getProfile();
String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX); String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX);
in = new FileInputStream(downloadPath); in = new FileInputStream(downloadPath);
} }
......
...@@ -4,7 +4,7 @@ import org.slf4j.Logger; ...@@ -4,7 +4,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.constant.Constants; import com.dsk.common.constant.Constants;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
import com.dsk.common.utils.http.HttpUtils; import com.dsk.common.utils.http.HttpUtils;
...@@ -31,7 +31,7 @@ public class AddressUtils ...@@ -31,7 +31,7 @@ public class AddressUtils
{ {
return "内网IP"; return "内网IP";
} }
if (RuoYiConfig.isAddressEnabled()) if (ShuZhiHuaConfig.isAddressEnabled())
{ {
try try
{ {
......
...@@ -76,7 +76,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; ...@@ -76,7 +76,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker; import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.exception.UtilException; import com.dsk.common.exception.UtilException;
import com.dsk.common.utils.StringUtils; import com.dsk.common.utils.StringUtils;
import com.dsk.common.utils.file.FileTypeUtils; import com.dsk.common.utils.file.FileTypeUtils;
...@@ -1341,7 +1341,7 @@ public class ExcelUtil<T> ...@@ -1341,7 +1341,7 @@ public class ExcelUtil<T>
*/ */
public String getAbsoluteFile(String filename) public String getAbsoluteFile(String filename)
{ {
String downloadPath = RuoYiConfig.getDownloadPath() + filename; String downloadPath = ShuZhiHuaConfig.getDownloadPath() + filename;
File desc = new File(downloadPath); File desc = new File(downloadPath);
if (!desc.getParentFile().exists()) if (!desc.getParentFile().exists())
{ {
......
...@@ -11,7 +11,7 @@ import org.springframework.web.filter.CorsFilter; ...@@ -11,7 +11,7 @@ import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.constant.Constants; import com.dsk.common.constant.Constants;
import com.dsk.framework.interceptor.RepeatSubmitInterceptor; import com.dsk.framework.interceptor.RepeatSubmitInterceptor;
...@@ -31,7 +31,7 @@ public class ResourcesConfig implements WebMvcConfigurer ...@@ -31,7 +31,7 @@ public class ResourcesConfig implements WebMvcConfigurer
{ {
/** 本地文件上传路径 */ /** 本地文件上传路径 */
registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**") registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**")
.addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); .addResourceLocations("file:" + ShuZhiHuaConfig.getProfile() + "/");
/** swagger配置 */ /** swagger配置 */
registry.addResourceHandler("/swagger-ui/**") registry.addResourceHandler("/swagger-ui/**")
......
...@@ -10,7 +10,7 @@ import com.dsk.common.utils.StringUtils; ...@@ -10,7 +10,7 @@ import com.dsk.common.utils.StringUtils;
import com.dsk.framework.security.context.PermissionContextHolder; import com.dsk.framework.security.context.PermissionContextHolder;
/** /**
* RuoYi首创 自定义权限实现,ss取自SpringSecurity首字母 * 自定义权限实现,ss取自SpringSecurity首字母
* *
* @author dsk * @author dsk
*/ */
......
...@@ -8,7 +8,6 @@ import java.util.List; ...@@ -8,7 +8,6 @@ import java.util.List;
/** /**
* 项目标签Mapper接口 * 项目标签Mapper接口
* *
* @author ruoyi
* @date 2023-05-17 * @date 2023-05-17
*/ */
public interface BusinessLabelMapper public interface BusinessLabelMapper
......
...@@ -7,7 +7,6 @@ import java.util.List; ...@@ -7,7 +7,6 @@ import java.util.List;
/** /**
* 项目联系人Service接口 * 项目联系人Service接口
* *
* @author ruoyi
* @date 2023-05-17 * @date 2023-05-17
*/ */
public interface IBusinessContactsService public interface IBusinessContactsService
......
...@@ -17,7 +17,6 @@ import java.util.Map; ...@@ -17,7 +17,6 @@ import java.util.Map;
/** /**
* 项目详情Service接口 * 项目详情Service接口
* *
* @author ruoyi
* @date 2023-05-17 * @date 2023-05-17
*/ */
public interface IBusinessInfoService public interface IBusinessInfoService
......
...@@ -8,7 +8,6 @@ import java.util.List; ...@@ -8,7 +8,6 @@ import java.util.List;
/** /**
* 项目标签Service接口 * 项目标签Service接口
* *
* @author ruoyi
* @date 2023-05-17 * @date 2023-05-17
*/ */
public interface IBusinessLabelService public interface IBusinessLabelService
......
...@@ -5,9 +5,8 @@ import cn.hutool.core.collection.CollectionUtil; ...@@ -5,9 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.dsk.acc.openapi.client.util.CommonUtils;
import com.dsk.common.annotation.DataScope; import com.dsk.common.annotation.DataScope;
import com.dsk.common.config.RuoYiConfig; import com.dsk.common.config.ShuZhiHuaConfig;
import com.dsk.common.constant.HttpStatus; import com.dsk.common.constant.HttpStatus;
import com.dsk.common.core.domain.AjaxResult; import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.*; import com.dsk.common.core.domain.entity.*;
...@@ -132,7 +131,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -132,7 +131,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
businessBrowseVo.setFollowRecordCount(total.getFollowRecordCount()); businessBrowseVo.setFollowRecordCount(total.getFollowRecordCount());
businessBrowseVo.setRelateCompanyCount(total.getRelateCompanyCount()); businessBrowseVo.setRelateCompanyCount(total.getRelateCompanyCount());
//资料文档统计 //资料文档统计
businessBrowseVo.setFileCount(FileUtils.getAllFileNames(RuoYiConfig.getProfile() + businessId).size()); businessBrowseVo.setFileCount(FileUtils.getAllFileNames(ShuZhiHuaConfig.getProfile() + businessId).size());
return businessBrowseVo; return businessBrowseVo;
} }
...@@ -334,7 +333,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService { ...@@ -334,7 +333,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//删除项目上传的文件 //删除项目上传的文件
for (Long id : ids) { for (Long id : ids) {
try { try {
FileUtils.delFolder(RuoYiConfig.getUploadPath() + id); FileUtils.delFolder(ShuZhiHuaConfig.getUploadPath() + id);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -11,16 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,16 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/** /**
* 项目标签Service业务层处理 * 项目标签Service业务层处理
* *
* @author ruoyi
* @date 2023-05-17 * @date 2023-05-17
*/ */
@Service @Service
public class BusinessLabelServiceImpl implements IBusinessLabelService public class BusinessLabelServiceImpl implements IBusinessLabelService
{ {
@Autowired @Resource
private BusinessLabelMapper businessLabelMapper; private BusinessLabelMapper businessLabelMapper;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment