Commit b735753a authored by lcl's avatar lcl

标记清除

parent 3591344e
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.domain.AjaxResult;
import com.dsk.common.core.domain.entity.BusinessFileVo;
......@@ -62,7 +62,7 @@ public class BusinessFileController extends BaseController {
public TableDataInfo getAllFiles(BusinessIdDto filePath) {
startPage();
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());
//模糊查询文件
if(StringUtils.isNotEmpty(filePath.getKeyword())){
......@@ -87,7 +87,7 @@ public class BusinessFileController extends BaseController {
String filename = file.getOriginalFilename();
String businessFileName = request.getHeader("FilePath");
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath() + businessFileName + "/";
String filePath = ShuZhiHuaConfig.getUploadPath() + businessFileName + "/";
//校验是否上传同名文件
File newFile = new File(filePath);
......
......@@ -12,7 +12,7 @@ import org.springframework.util.FastByteArrayOutputStream;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
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.Constants;
import com.dsk.common.core.domain.AjaxResult;
......@@ -62,7 +62,7 @@ public class CaptchaController
BufferedImage image = null;
// 生成验证码
String captchaType = RuoYiConfig.getCaptchaType();
String captchaType = ShuZhiHuaConfig.getCaptchaType();
if ("math".equals(captchaType))
{
String capText = captchaProducerMath.createText();
......
......@@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
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.core.domain.AjaxResult;
import com.dsk.common.utils.StringUtils;
......@@ -53,7 +53,7 @@ public class CommonController
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
}
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);
FileUtils.setAttachmentResponseHeader(response, realFileName);
......@@ -78,7 +78,7 @@ public class CommonController
try
{
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
String filePath = ShuZhiHuaConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName;
......@@ -104,7 +104,7 @@ public class CommonController
try
{
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
String filePath = ShuZhiHuaConfig.getUploadPath();
List<String> urls = new ArrayList<String>();
List<String> fileNames = new ArrayList<String>();
List<String> newFileNames = new ArrayList<String>();
......@@ -146,7 +146,7 @@ public class CommonController
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
}
// 本地资源路径
String localPath = RuoYiConfig.getProfile();
String localPath = ShuZhiHuaConfig.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
......
......@@ -3,7 +3,7 @@ package com.dsk.web.controller.system;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
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;
/**
......@@ -16,7 +16,7 @@ public class SysIndexController
{
/** 系统基础配置 */
@Autowired
private RuoYiConfig ruoyiConfig;
private ShuZhiHuaConfig shuZhiHuaConfig;
/**
* 访问首页,提示语
......@@ -24,6 +24,6 @@ public class SysIndexController
@RequestMapping("/")
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;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
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.domain.AjaxResult;
import com.dsk.common.core.domain.entity.SysUser;
......@@ -125,7 +125,7 @@ public class SysProfileController extends BaseController
if (!file.isEmpty())
{
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))
{
AjaxResult ajax = AjaxResult.success();
......
......@@ -6,7 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
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.models.auth.In;
import springfox.documentation.builders.ApiInfoBuilder;
......@@ -32,7 +32,7 @@ public class SwaggerConfig
{
/** 系统基础配置 */
@Autowired
private RuoYiConfig ruoyiConfig;
private ShuZhiHuaConfig shuZhiHuaConfig;
/** 是否开启swagger */
@Value("${swagger.enabled}")
......@@ -58,7 +58,7 @@ public class SwaggerConfig
// 扫描所有有注解的api,用这种方式更灵活
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// 扫描指定包中的swagger注解
// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
// .apis(RequestHandlerSelectors.basePackage("com.dsk.project.tool.swagger"))
// 扫描所有 .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
......@@ -117,9 +117,9 @@ public class SwaggerConfig
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null))
.contact(new Contact(shuZhiHuaConfig.getName(), null, null))
// 版本
.version("版本号:" + ruoyiConfig.getVersion())
.version("版本号:" + shuZhiHuaConfig.getVersion())
.build();
}
}
# 项目相关配置
ruoyi:
shuzhihua:
# 名称
name: RuoYi
name: ShuZhiHua
# 版本
version: 3.8.5
# 版权年份
copyrightYear: 2023
# 实例演示开关
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: /home/server/dsk-operate-sys/uploadPath/
# 获取ip地址开关
......@@ -37,7 +37,7 @@ server:
# 日志配置
logging:
level:
com.ruoyi: debug
com.dsk: debug
org.springframework: warn
# 用户配置
......@@ -97,7 +97,7 @@ spring:
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-username: dskadmin
login-password: 123456
filter:
stat:
......
# 项目相关配置
ruoyi:
shuzhihua:
# 名称
name: RuoYi
name: ShuZhiHua
# 版本
version: 3.8.5
# 版权年份
copyrightYear: 2023
# 实例演示开关
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: /home/server/dsk-operate-sys/uploadPath/
# 获取ip地址开关
......@@ -37,7 +37,7 @@ server:
# 日志配置
logging:
level:
com.ruoyi: debug
com.dsk: info
org.springframework: warn
# 用户配置
......@@ -97,7 +97,7 @@ spring:
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-username: dskadmin
login-password: 123456
filter:
stat:
......
# 项目相关配置
ruoyi:
shuzhihua:
# 名称
name: RuoYi
name: ShuZhiHua
# 版本
version: 3.8.5
# 版权年份
copyrightYear: 2023
# 实例演示开关
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: /home/server/dsk-operate-sys/uploadPath/
# 获取ip地址开关
......@@ -37,7 +37,7 @@ server:
# 日志配置
logging:
level:
com.ruoyi: debug
com.dsk: debug
org.springframework: warn
# 用户配置
......@@ -97,7 +97,7 @@ spring:
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-username: dskadmin
login-password: 123456
filter:
stat:
......
Application Version: ${ruoyi.version}
Application Version: ${shuzhihua.version}
Spring Boot Version: ${spring-boot.version}
......@@ -9,8 +9,8 @@ import org.springframework.stereotype.Component;
* @author dsk
*/
@Component
@ConfigurationProperties(prefix = "ruoyi")
public class RuoYiConfig
@ConfigurationProperties(prefix = "shuzhihua")
public class ShuZhiHuaConfig
{
/** 项目名称 */
private String name;
......@@ -80,7 +80,7 @@ public class RuoYiConfig
public void setProfile(String profile)
{
RuoYiConfig.profile = profile;
ShuZhiHuaConfig.profile = profile;
}
public static boolean isAddressEnabled()
......@@ -90,7 +90,7 @@ public class RuoYiConfig
public void setAddressEnabled(boolean addressEnabled)
{
RuoYiConfig.addressEnabled = addressEnabled;
ShuZhiHuaConfig.addressEnabled = addressEnabled;
}
public static String getCaptchaType() {
......@@ -98,7 +98,7 @@ public class RuoYiConfig
}
public void setCaptchaType(String captchaType) {
RuoYiConfig.captchaType = captchaType;
ShuZhiHuaConfig.captchaType = captchaType;
}
/**
......
......@@ -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",
"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
/**
* 获取文件类型
* <p>
* 例如: ruoyi.txt, 返回: txt
* 例如: dsk.txt, 返回: txt
*
* @param file 文件名
* @return 后缀(不含".")
......@@ -30,7 +30,7 @@ public class FileTypeUtils
/**
* 获取文件类型
* <p>
* 例如: ruoyi.txt, 返回: txt
* 例如: dsk.txt, 返回: txt
*
* @param fileName 文件名
* @return 后缀(不含".")
......
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.exception.file.FileNameLengthLimitExceededException;
import com.dsk.common.exception.file.FileSizeLimitExceededException;
......@@ -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)
{
......@@ -145,7 +145,7 @@ public class FileUploadUtils
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);
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
}
......
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.exception.base.BaseException;
import com.dsk.common.utils.DateUtils;
......@@ -127,7 +127,7 @@ public class FileUtils
*/
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
}
/**
* 获取文件名称 /profile/upload/2022/04/16/ruoyi.png -- ruoyi.png
* 获取文件名称 /profile/upload/2022/04/16/dsk.png -- dsk.png
*
* @param fileName 路径名称
* @return 没有文件路径的名称
......@@ -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 路径名称
* @return 没有文件路径和后缀的名称
......
......@@ -12,7 +12,7 @@ import com.dsk.common.utils.StringUtils;
import org.apache.poi.util.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.dsk.common.config.RuoYiConfig;
import com.dsk.common.config.ShuZhiHuaConfig;
/**
* 图片处理工具类
......@@ -80,7 +80,7 @@ public class ImageUtils
else
{
// 本机地址
String localPath = RuoYiConfig.getProfile();
String localPath = ShuZhiHuaConfig.getProfile();
String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX);
in = new FileInputStream(downloadPath);
}
......
......@@ -4,7 +4,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.fastjson2.JSON;
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.utils.StringUtils;
import com.dsk.common.utils.http.HttpUtils;
......@@ -31,7 +31,7 @@ public class AddressUtils
{
return "内网IP";
}
if (RuoYiConfig.isAddressEnabled())
if (ShuZhiHuaConfig.isAddressEnabled())
{
try
{
......
......@@ -76,7 +76,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
import org.slf4j.Logger;
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.utils.StringUtils;
import com.dsk.common.utils.file.FileTypeUtils;
......@@ -1341,7 +1341,7 @@ public class ExcelUtil<T>
*/
public String getAbsoluteFile(String filename)
{
String downloadPath = RuoYiConfig.getDownloadPath() + filename;
String downloadPath = ShuZhiHuaConfig.getDownloadPath() + filename;
File desc = new File(downloadPath);
if (!desc.getParentFile().exists())
{
......
......@@ -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.ResourceHandlerRegistry;
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.framework.interceptor.RepeatSubmitInterceptor;
......@@ -31,7 +31,7 @@ public class ResourcesConfig implements WebMvcConfigurer
{
/** 本地文件上传路径 */
registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**")
.addResourceLocations("file:" + RuoYiConfig.getProfile() + "/");
.addResourceLocations("file:" + ShuZhiHuaConfig.getProfile() + "/");
/** swagger配置 */
registry.addResourceHandler("/swagger-ui/**")
......
......@@ -10,7 +10,7 @@ import com.dsk.common.utils.StringUtils;
import com.dsk.framework.security.context.PermissionContextHolder;
/**
* RuoYi首创 自定义权限实现,ss取自SpringSecurity首字母
* 自定义权限实现,ss取自SpringSecurity首字母
*
* @author dsk
*/
......
......@@ -8,7 +8,6 @@ import java.util.List;
/**
* 项目标签Mapper接口
*
* @author ruoyi
* @date 2023-05-17
*/
public interface BusinessLabelMapper
......
......@@ -6,15 +6,14 @@ import java.util.List;
/**
* 项目联系人Service接口
*
* @author ruoyi
*
* @date 2023-05-17
*/
public interface IBusinessContactsService
public interface IBusinessContactsService
{
/**
* 查询项目联系人
*
*
* @param id 项目联系人主键
* @return 项目联系人
*/
......@@ -22,7 +21,7 @@ public interface IBusinessContactsService
/**
* 查询项目联系人列表
*
*
* @param businessContacts 项目联系人
* @return 项目联系人集合
*/
......@@ -30,7 +29,7 @@ public interface IBusinessContactsService
/**
* 新增项目联系人
*
*
* @param businessContacts 项目联系人
* @return 结果
*/
......@@ -38,7 +37,7 @@ public interface IBusinessContactsService
/**
* 修改项目联系人
*
*
* @param businessContacts 项目联系人
* @return 结果
*/
......@@ -46,7 +45,7 @@ public interface IBusinessContactsService
/**
* 批量删除项目联系人
*
*
* @param ids 需要删除的项目联系人主键集合
* @return 结果
*/
......@@ -54,7 +53,7 @@ public interface IBusinessContactsService
/**
* 删除项目联系人信息
*
*
* @param id 项目联系人主键
* @return 结果
*/
......
......@@ -17,7 +17,6 @@ import java.util.Map;
/**
* 项目详情Service接口
*
* @author ruoyi
* @date 2023-05-17
*/
public interface IBusinessInfoService
......
......@@ -8,7 +8,6 @@ import java.util.List;
/**
* 项目标签Service接口
*
* @author ruoyi
* @date 2023-05-17
*/
public interface IBusinessLabelService
......
......@@ -5,9 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.acc.openapi.client.util.CommonUtils;
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.core.domain.AjaxResult;
import com.dsk.common.core.domain.entity.*;
......@@ -132,7 +131,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
businessBrowseVo.setFollowRecordCount(total.getFollowRecordCount());
businessBrowseVo.setRelateCompanyCount(total.getRelateCompanyCount());
//资料文档统计
businessBrowseVo.setFileCount(FileUtils.getAllFileNames(RuoYiConfig.getProfile() + businessId).size());
businessBrowseVo.setFileCount(FileUtils.getAllFileNames(ShuZhiHuaConfig.getProfile() + businessId).size());
return businessBrowseVo;
}
......@@ -334,7 +333,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//删除项目上传的文件
for (Long id : ids) {
try {
FileUtils.delFolder(RuoYiConfig.getUploadPath() + id);
FileUtils.delFolder(ShuZhiHuaConfig.getUploadPath() + id);
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -11,16 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* 项目标签Service业务层处理
*
* @author ruoyi
*
* @date 2023-05-17
*/
@Service
public class BusinessLabelServiceImpl implements IBusinessLabelService
{
@Autowired
@Resource
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