Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
b735753a
Commit
b735753a
authored
Aug 03, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标记清除
parent
3591344e
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
76 additions
and
80 deletions
+76
-80
BusinessFileController.java
...m/dsk/web/controller/business/BusinessFileController.java
+3
-3
CaptchaController.java
...java/com/dsk/web/controller/common/CaptchaController.java
+2
-2
CommonController.java
.../java/com/dsk/web/controller/common/CommonController.java
+5
-5
SysIndexController.java
...ava/com/dsk/web/controller/system/SysIndexController.java
+3
-3
SysProfileController.java
...a/com/dsk/web/controller/system/SysProfileController.java
+2
-2
SwaggerConfig.java
.../src/main/java/com/dsk/web/core/config/SwaggerConfig.java
+5
-5
application-dev.yml
dsk-admin/src/main/resources/application-dev.yml
+5
-5
application-pre.yml
dsk-admin/src/main/resources/application-pre.yml
+5
-5
application-test.yml
dsk-admin/src/main/resources/application-test.yml
+5
-5
banner.txt
dsk-admin/src/main/resources/banner.txt
+1
-1
ShuZhiHuaConfig.java
.../src/main/java/com/dsk/common/config/ShuZhiHuaConfig.java
+5
-5
Constants.java
...mmon/src/main/java/com/dsk/common/constant/Constants.java
+2
-2
FileTypeUtils.java
...rc/main/java/com/dsk/common/utils/file/FileTypeUtils.java
+2
-2
FileUploadUtils.java
.../main/java/com/dsk/common/utils/file/FileUploadUtils.java
+3
-3
FileUtils.java
...on/src/main/java/com/dsk/common/utils/file/FileUtils.java
+4
-4
ImageUtils.java
...n/src/main/java/com/dsk/common/utils/file/ImageUtils.java
+2
-2
AddressUtils.java
...n/src/main/java/com/dsk/common/utils/ip/AddressUtils.java
+2
-2
ExcelUtil.java
...mon/src/main/java/com/dsk/common/utils/poi/ExcelUtil.java
+2
-2
ResourcesConfig.java
...c/main/java/com/dsk/framework/config/ResourcesConfig.java
+2
-2
PermissionService.java
...java/com/dsk/framework/web/service/PermissionService.java
+1
-1
BusinessLabelMapper.java
.../main/java/com/dsk/system/mapper/BusinessLabelMapper.java
+0
-1
IBusinessContactsService.java
...java/com/dsk/system/service/IBusinessContactsService.java
+8
-9
IBusinessInfoService.java
...ain/java/com/dsk/system/service/IBusinessInfoService.java
+0
-1
IBusinessLabelService.java
...in/java/com/dsk/system/service/IBusinessLabelService.java
+0
-1
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+3
-4
BusinessLabelServiceImpl.java
...com/dsk/system/service/impl/BusinessLabelServiceImpl.java
+4
-3
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessFileController.java
View file @
b735753a
package
com
.
dsk
.
web
.
controller
.
business
;
import
com.dsk.common.config.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
(
RuoYi
Config
.
getProfile
()
+
filePath
.
getFilePath
());
if
(
StringUtils
.
isNumeric
(
filePath
.
getFilePath
()))
filePath
.
setFilePath
(
ShuZhiHua
Config
.
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
=
RuoYi
Config
.
getUploadPath
()
+
businessFileName
+
"/"
;
String
filePath
=
ShuZhiHua
Config
.
getUploadPath
()
+
businessFileName
+
"/"
;
//校验是否上传同名文件
File
newFile
=
new
File
(
filePath
);
...
...
dsk-admin/src/main/java/com/dsk/web/controller/common/CaptchaController.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
=
RuoYi
Config
.
getCaptchaType
();
String
captchaType
=
ShuZhiHua
Config
.
getCaptchaType
();
if
(
"math"
.
equals
(
captchaType
))
{
String
capText
=
captchaProducerMath
.
createText
();
...
...
dsk-admin/src/main/java/com/dsk/web/controller/common/CommonController.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
=
RuoYi
Config
.
getDownloadPath
()
+
fileName
;
String
filePath
=
ShuZhiHua
Config
.
getDownloadPath
()
+
fileName
;
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
FileUtils
.
setAttachmentResponseHeader
(
response
,
realFileName
);
...
...
@@ -78,7 +78,7 @@ public class CommonController
try
{
// 上传文件路径
String
filePath
=
RuoYi
Config
.
getUploadPath
();
String
filePath
=
ShuZhiHua
Config
.
getUploadPath
();
// 上传并返回新文件名称
String
fileName
=
FileUploadUtils
.
upload
(
filePath
,
file
);
String
url
=
serverConfig
.
getUrl
()
+
fileName
;
...
...
@@ -104,7 +104,7 @@ public class CommonController
try
{
// 上传文件路径
String
filePath
=
RuoYi
Config
.
getUploadPath
();
String
filePath
=
ShuZhiHua
Config
.
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
=
RuoYi
Config
.
getProfile
();
String
localPath
=
ShuZhiHua
Config
.
getProfile
();
// 数据库资源地址
String
downloadPath
=
localPath
+
StringUtils
.
substringAfter
(
resource
,
Constants
.
RESOURCE_PREFIX
);
// 下载名称
...
...
dsk-admin/src/main/java/com/dsk/web/controller/system/SysIndexController.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
import
com.dsk.common.utils.StringUtils
;
/**
...
...
@@ -16,7 +16,7 @@ public class SysIndexController
{
/** 系统基础配置 */
@Autowired
private
RuoYiConfig
ruoyi
Config
;
private
ShuZhiHuaConfig
shuZhiHua
Config
;
/**
* 访问首页,提示语
...
...
@@ -24,6 +24,6 @@ public class SysIndexController
@RequestMapping
(
"/"
)
public
String
index
()
{
return
StringUtils
.
format
(
"欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。"
,
ruoyiConfig
.
getName
(),
ruoyi
Config
.
getVersion
());
return
StringUtils
.
format
(
"欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。"
,
shuZhiHuaConfig
.
getName
(),
shuZhiHua
Config
.
getVersion
());
}
}
dsk-admin/src/main/java/com/dsk/web/controller/system/SysProfileController.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
(
RuoYi
Config
.
getAvatarPath
(),
file
,
MimeTypeUtils
.
IMAGE_EXTENSION
);
String
avatar
=
FileUploadUtils
.
upload
(
ShuZhiHua
Config
.
getAvatarPath
(),
file
,
MimeTypeUtils
.
IMAGE_EXTENSION
);
if
(
userService
.
updateUserAvatar
(
loginUser
.
getUsername
(),
avatar
))
{
AjaxResult
ajax
=
AjaxResult
.
success
();
...
...
dsk-admin/src/main/java/com/dsk/web/core/config/SwaggerConfig.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
ruoyi
Config
;
private
ShuZhiHuaConfig
shuZhiHua
Config
;
/** 是否开启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
(
ruoyi
Config
.
getName
(),
null
,
null
))
.
contact
(
new
Contact
(
shuZhiHua
Config
.
getName
(),
null
,
null
))
// 版本
.
version
(
"版本号:"
+
ruoyi
Config
.
getVersion
())
.
version
(
"版本号:"
+
shuZhiHua
Config
.
getVersion
())
.
build
();
}
}
dsk-admin/src/main/resources/application-dev.yml
View file @
b735753a
# 项目相关配置
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
:
...
...
dsk-admin/src/main/resources/application-pre.yml
View file @
b735753a
# 项目相关配置
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
:
...
...
dsk-admin/src/main/resources/application-test.yml
View file @
b735753a
# 项目相关配置
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
:
...
...
dsk-admin/src/main/resources/banner.txt
View file @
b735753a
Application Version: ${
ruoyi
.version}
Application Version: ${
shuzhihua
.version}
Spring Boot Version: ${spring-boot.version}
dsk-common/src/main/java/com/dsk/common/config/
RuoYi
Config.java
→
dsk-common/src/main/java/com/dsk/common/config/
ShuZhiHua
Config.java
View file @
b735753a
...
...
@@ -9,8 +9,8 @@ import org.springframework.stereotype.Component;
* @author dsk
*/
@Component
@ConfigurationProperties
(
prefix
=
"
ruoyi
"
)
public
class
RuoYi
Config
@ConfigurationProperties
(
prefix
=
"
shuzhihua
"
)
public
class
ShuZhiHua
Config
{
/** 项目名称 */
private
String
name
;
...
...
@@ -80,7 +80,7 @@ public class RuoYiConfig
public
void
setProfile
(
String
profile
)
{
RuoYi
Config
.
profile
=
profile
;
ShuZhiHua
Config
.
profile
=
profile
;
}
public
static
boolean
isAddressEnabled
()
...
...
@@ -90,7 +90,7 @@ public class RuoYiConfig
public
void
setAddressEnabled
(
boolean
addressEnabled
)
{
RuoYi
Config
.
addressEnabled
=
addressEnabled
;
ShuZhiHua
Config
.
addressEnabled
=
addressEnabled
;
}
public
static
String
getCaptchaType
()
{
...
...
@@ -98,7 +98,7 @@ public class RuoYiConfig
}
public
void
setCaptchaType
(
String
captchaType
)
{
RuoYi
Config
.
captchaType
=
captchaType
;
ShuZhiHua
Config
.
captchaType
=
captchaType
;
}
/**
...
...
dsk-common/src/main/java/com/dsk/common/constant/Constants.java
View file @
b735753a
...
...
@@ -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"
};
}
dsk-common/src/main/java/com/dsk/common/utils/file/FileTypeUtils.java
View file @
b735753a
...
...
@@ -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 后缀(不含".")
...
...
dsk-common/src/main/java/com/dsk/common/utils/file/FileUploadUtils.java
View file @
b735753a
package
com
.
dsk
.
common
.
utils
.
file
;
import
com.dsk.common.config.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
=
RuoYi
Config
.
getProfile
();
private
static
String
defaultBaseDir
=
ShuZhiHua
Config
.
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
=
RuoYi
Config
.
getProfile
().
length
()
+
1
;
int
dirLastIndex
=
ShuZhiHua
Config
.
getProfile
().
length
()
+
1
;
String
currentDir
=
StringUtils
.
substring
(
uploadDir
,
dirLastIndex
);
return
Constants
.
RESOURCE_PREFIX
+
"/"
+
currentDir
+
"/"
+
fileName
;
}
...
...
dsk-common/src/main/java/com/dsk/common/utils/file/FileUtils.java
View file @
b735753a
package
com
.
dsk
.
common
.
utils
.
file
;
import
com.dsk.common.config.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
,
RuoYi
Config
.
getImportPath
());
return
writeBytes
(
data
,
ShuZhiHua
Config
.
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 没有文件路径和后缀的名称
...
...
dsk-common/src/main/java/com/dsk/common/utils/file/ImageUtils.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
/**
* 图片处理工具类
...
...
@@ -80,7 +80,7 @@ public class ImageUtils
else
{
// 本机地址
String
localPath
=
RuoYi
Config
.
getProfile
();
String
localPath
=
ShuZhiHua
Config
.
getProfile
();
String
downloadPath
=
localPath
+
StringUtils
.
substringAfter
(
url
,
Constants
.
RESOURCE_PREFIX
);
in
=
new
FileInputStream
(
downloadPath
);
}
...
...
dsk-common/src/main/java/com/dsk/common/utils/ip/AddressUtils.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
(
RuoYi
Config
.
isAddressEnabled
())
if
(
ShuZhiHua
Config
.
isAddressEnabled
())
{
try
{
...
...
dsk-common/src/main/java/com/dsk/common/utils/poi/ExcelUtil.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
=
RuoYi
Config
.
getDownloadPath
()
+
filename
;
String
downloadPath
=
ShuZhiHua
Config
.
getDownloadPath
()
+
filename
;
File
desc
=
new
File
(
downloadPath
);
if
(!
desc
.
getParentFile
().
exists
())
{
...
...
dsk-framework/src/main/java/com/dsk/framework/config/ResourcesConfig.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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:"
+
RuoYi
Config
.
getProfile
()
+
"/"
);
.
addResourceLocations
(
"file:"
+
ShuZhiHua
Config
.
getProfile
()
+
"/"
);
/** swagger配置 */
registry
.
addResourceHandler
(
"/swagger-ui/**"
)
...
...
dsk-framework/src/main/java/com/dsk/framework/web/service/PermissionService.java
View file @
b735753a
...
...
@@ -10,7 +10,7 @@ import com.dsk.common.utils.StringUtils;
import
com.dsk.framework.security.context.PermissionContextHolder
;
/**
*
RuoYi首创
自定义权限实现,ss取自SpringSecurity首字母
* 自定义权限实现,ss取自SpringSecurity首字母
*
* @author dsk
*/
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessLabelMapper.java
View file @
b735753a
...
...
@@ -8,7 +8,6 @@ import java.util.List;
/**
* 项目标签Mapper接口
*
* @author ruoyi
* @date 2023-05-17
*/
public
interface
BusinessLabelMapper
...
...
dsk-system/src/main/java/com/dsk/system/service/IBusinessContactsService.java
View file @
b735753a
...
...
@@ -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 结果
*/
...
...
dsk-system/src/main/java/com/dsk/system/service/IBusinessInfoService.java
View file @
b735753a
...
...
@@ -17,7 +17,6 @@ import java.util.Map;
/**
* 项目详情Service接口
*
* @author ruoyi
* @date 2023-05-17
*/
public
interface
IBusinessInfoService
...
...
dsk-system/src/main/java/com/dsk/system/service/IBusinessLabelService.java
View file @
b735753a
...
...
@@ -8,7 +8,6 @@ import java.util.List;
/**
* 项目标签Service接口
*
* @author ruoyi
* @date 2023-05-17
*/
public
interface
IBusinessLabelService
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
b735753a
...
...
@@ -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.
RuoYi
Config
;
import
com.dsk.common.config.
ShuZhiHua
Config
;
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
(
RuoYi
Config
.
getProfile
()
+
businessId
).
size
());
businessBrowseVo
.
setFileCount
(
FileUtils
.
getAllFileNames
(
ShuZhiHua
Config
.
getProfile
()
+
businessId
).
size
());
return
businessBrowseVo
;
}
...
...
@@ -334,7 +333,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
//删除项目上传的文件
for
(
Long
id
:
ids
)
{
try
{
FileUtils
.
delFolder
(
RuoYi
Config
.
getUploadPath
()
+
id
);
FileUtils
.
delFolder
(
ShuZhiHua
Config
.
getUploadPath
()
+
id
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessLabelServiceImpl.java
View file @
b735753a
...
...
@@ -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
;
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment