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
a0a245aa
Commit
a0a245aa
authored
Sep 15, 2023
by
tanyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修复 新增租户管理员角色
parent
b8bed64d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
49 deletions
+59
-49
CaptchaController.java
...java/com/dsk/web/controller/common/CaptchaController.java
+3
-0
application-dev.yml
dsk-admin/src/main/resources/application-dev.yml
+6
-2
application-prod.yml
dsk-admin/src/main/resources/application-prod.yml
+40
-42
application-test.yml
dsk-admin/src/main/resources/application-test.yml
+2
-2
application.yml
dsk-admin/src/main/resources/application.yml
+2
-1
InvalidExtensionException.java
.../dsk/common/exception/file/InvalidExtensionException.java
+3
-1
BusinessInfoController.java
...n/java/com/dsk/biz/controller/BusinessInfoController.java
+2
-0
SysLoginService.java
...src/main/java/com/dsk/system/service/SysLoginService.java
+1
-1
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/common/CaptchaController.java
View file @
a0a245aa
...
@@ -5,6 +5,7 @@ import cn.hutool.captcha.AbstractCaptcha;
...
@@ -5,6 +5,7 @@ import cn.hutool.captcha.AbstractCaptcha;
import
cn.hutool.captcha.generator.CodeGenerator
;
import
cn.hutool.captcha.generator.CodeGenerator
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.dsk.common.constant.CacheConstants
;
import
com.dsk.common.constant.Constants
;
import
com.dsk.common.constant.Constants
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.common.core.domain.R
;
...
@@ -12,6 +13,8 @@ import com.dsk.common.enums.CaptchaType;
...
@@ -12,6 +13,8 @@ import com.dsk.common.enums.CaptchaType;
import
com.dsk.common.exception.user.CaptchaException
;
import
com.dsk.common.exception.user.CaptchaException
;
import
com.dsk.common.exception.user.CaptchaExpireException
;
import
com.dsk.common.exception.user.CaptchaExpireException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.MessageUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.email.MailUtils
;
import
com.dsk.common.utils.email.MailUtils
;
import
com.dsk.common.utils.redis.RedisUtils
;
import
com.dsk.common.utils.redis.RedisUtils
;
...
...
dsk-admin/src/main/resources/application-dev.yml
View file @
a0a245aa
...
@@ -49,9 +49,13 @@ spring:
...
@@ -49,9 +49,13 @@ spring:
driverClassName
:
com.mysql.cj.jdbc.Driver
driverClassName
:
com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url
:
jdbc:mysql://47.104.91.229:3306/dsk_operate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://47.104.91.229:3306/dsk_operate?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: dev
# password: zfTFIJjaN#6xB83r
url
:
jdbc:mysql://139.9.157.49:3306/dsk_operate_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
dev
username
:
dev
password
:
zfTFIJjaN#6xB83r
password
:
8AXjjCHZ666!
# 从库数据源
# 从库数据源
# slave:
# slave:
# lazy: true
# lazy: true
...
...
dsk-admin/src/main/resources/application-prod.yml
View file @
a0a245aa
---
# 临时文件存储位置 避免临时文件被系统清理报错
spring.servlet.multipart.location
:
/ruoyi/server/temp
---
# 监控中心配置
---
# 监控中心配置
spring.boot.admin.client
:
spring.boot.admin.client
:
# 增加客户端开关
# 增加客户端开关
...
@@ -8,8 +5,8 @@ spring.boot.admin.client:
...
@@ -8,8 +5,8 @@ spring.boot.admin.client:
url
:
http://localhost:9090/admin
url
:
http://localhost:9090/admin
instance
:
instance
:
service-host-type
:
IP
service-host-type
:
IP
username
:
ruoyi
username
:
dsk-operate
password
:
123456
password
:
dsk123123
---
# xxl-job 配置
---
# xxl-job 配置
xxl.job
:
xxl.job
:
...
@@ -52,37 +49,37 @@ spring:
...
@@ -52,37 +49,37 @@ spring:
driverClassName
:
com.mysql.cj.jdbc.Driver
driverClassName
:
com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url
:
jdbc:mysql://
localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
url
:
jdbc:mysql://
192.168.0.79:3306/dsk_operate_sys?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
username
:
dev
password
:
root
password
:
8AXjjCHZ666!
# 从库数据源
# 从库数据源
slave
:
#
slave:
lazy
:
true
#
lazy: true
type
:
${spring.datasource.type}
#
type: ${spring.datasource.type}
driverClassName
:
com.mysql.cj.jdbc.Driver
#
driverClassName: com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
#
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
username
:
#
username:
password
:
#
password:
# oracle:
# oracle:
# type: ${spring.datasource.type}
# type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver
# driverClassName: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@//localhost:1521/XE
# url: jdbc:oracle:thin:@//localhost:1521/XE
# username: ROOT
# username: ROOT
# password: root
# password: root
# hikari:
# hikari:
# connectionTestQuery: SELECT 1 FROM DUAL
# connectionTestQuery: SELECT 1 FROM DUAL
# postgres:
# postgres:
# type: ${spring.datasource.type}
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
# username: root
# username: root
# password: root
# password: root
# sqlserver:
# sqlserver:
# type: ${spring.datasource.type}
# type: ${spring.datasource.type}
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
# username: SA
# username: SA
# password: root
# password: root
hikari
:
hikari
:
# 最大连接池数量
# 最大连接池数量
maxPoolSize
:
20
maxPoolSize
:
20
...
@@ -104,12 +101,13 @@ spring:
...
@@ -104,12 +101,13 @@ spring:
---
# redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
---
# redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
spring
:
spring
:
redis
:
redis
:
# 地址
host
:
192.168.0.79
host
:
localhost
# 端口,默认为6379
# 端口,默认为6379
port
:
6379
port
:
6379
# 数据库索引
# 数据库索引
database
:
0
database
:
6
# 密码
password
:
zfTFIJjaN#6xB83r
# 密码(如没有密码请注释掉)
# 密码(如没有密码请注释掉)
# password:
# password:
# 连接超时时间
# 连接超时时间
...
@@ -121,17 +119,17 @@ redisson:
...
@@ -121,17 +119,17 @@ redisson:
# redis key前缀
# redis key前缀
keyPrefix
:
keyPrefix
:
# 线程池数量
# 线程池数量
threads
:
16
threads
:
4
# Netty线程池数量
# Netty线程池数量
nettyThreads
:
32
nettyThreads
:
8
# 单节点配置
# 单节点配置
singleServerConfig
:
singleServerConfig
:
# 客户端名称
# 客户端名称
clientName
:
${ruoyi.name}
clientName
:
${ruoyi.name}
# 最小空闲连接数
# 最小空闲连接数
connectionMinimumIdleSize
:
32
connectionMinimumIdleSize
:
8
# 连接池大小
# 连接池大小
connectionPoolSize
:
64
connectionPoolSize
:
32
# 连接空闲超时,单位:毫秒
# 连接空闲超时,单位:毫秒
idleConnectionTimeout
:
10000
idleConnectionTimeout
:
10000
# 命令等待超时,单位:毫秒
# 命令等待超时,单位:毫秒
...
...
dsk-admin/src/main/resources/application-test.yml
View file @
a0a245aa
...
@@ -49,9 +49,9 @@ spring:
...
@@ -49,9 +49,9 @@ spring:
driverClassName
:
com.mysql.cj.jdbc.Driver
driverClassName
:
com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
url
:
jdbc:mysql://
47.104.91.229:3306/dsk_operate
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://
139.9.157.49:3306/dsk_operate_test
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
dev
username
:
dev
password
:
zfTFIJjaN#6xB83r
password
:
8AXjjCHZ666!
# 从库数据源
# 从库数据源
# slave:
# slave:
# lazy: true
# lazy: true
...
...
dsk-admin/src/main/resources/application.yml
View file @
a0a245aa
...
@@ -112,7 +112,7 @@ sa-token:
...
@@ -112,7 +112,7 @@ sa-token:
# token最低活跃时间 (指定时间无操作就过期) 单位: 秒
# token最低活跃时间 (指定时间无操作就过期) 单位: 秒
active-timeout
:
18000
active-timeout
:
18000
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent
:
tru
e
is-concurrent
:
fals
e
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share
:
false
is-share
:
false
# 是否尝试从header里读取token
# 是否尝试从header里读取token
...
@@ -143,6 +143,7 @@ security:
...
@@ -143,6 +143,7 @@ security:
-
/actuator
-
/actuator
-
/actuator/**
-
/actuator/**
# 多租户配置
# 多租户配置
tenant
:
tenant
:
# 是否开启
# 是否开启
...
...
dsk-common/src/main/java/com/dsk/common/exception/file/InvalidExtensionException.java
View file @
a0a245aa
package
com
.
dsk
.
common
.
exception
.
file
;
package
com
.
dsk
.
common
.
exception
.
file
;
import
org.apache.tomcat.util.http.fileupload.FileUploadException
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/controller/BusinessInfoController.java
View file @
a0a245aa
package
com
.
dsk
.
biz
.
controller
;
package
com
.
dsk
.
biz
.
controller
;
import
cn.dev33.satoken.annotation.SaCheckLogin
;
import
com.dsk.biz.domain.BusinessInfo
;
import
com.dsk.biz.domain.BusinessInfo
;
import
com.dsk.biz.domain.bo.BusinessAddDto
;
import
com.dsk.biz.domain.bo.BusinessAddDto
;
import
com.dsk.biz.domain.bo.BusinessListDto
;
import
com.dsk.biz.domain.bo.BusinessListDto
;
...
@@ -64,6 +65,7 @@ public class BusinessInfoController extends BaseController
...
@@ -64,6 +65,7 @@ public class BusinessInfoController extends BaseController
* 查询项目速览
* 查询项目速览
*/
*/
// @PreAuthorize("@ss.hasPermi('system:business:query')")
// @PreAuthorize("@ss.hasPermi('system:business:query')")
@SaCheckLogin
@GetMapping
(
"/browse/{businessId}"
)
@GetMapping
(
"/browse/{businessId}"
)
public
R
<
BusinessBrowseVo
>
browse
(
@PathVariable
(
"businessId"
)
Integer
businessId
)
public
R
<
BusinessBrowseVo
>
browse
(
@PathVariable
(
"businessId"
)
Integer
businessId
)
{
{
...
...
dsk-system/src/main/java/com/dsk/system/service/SysLoginService.java
View file @
a0a245aa
...
@@ -503,7 +503,7 @@ public class SysLoginService {
...
@@ -503,7 +503,7 @@ public class SysLoginService {
}
}
SysTenantVo
tenant
=
sysTenantService
.
queryByTenantId
(
tenantId
);
SysTenantVo
tenant
=
sysTenantService
.
queryByTenantId
(
tenantId
);
if
(
ObjectUtil
.
isNull
(
tenant
))
{
if
(
ObjectUtil
.
isNull
(
tenant
))
{
log
.
info
(
"登录企业:{} 不存在."
,
tenant
.
getCompanyName
()
);
log
.
info
(
"登录企业:{} 不存在."
,
tenant
Id
);
throw
new
TenantException
(
"company.not.exists"
);
throw
new
TenantException
(
"company.not.exists"
);
}
else
if
(
TenantStatus
.
DISABLE
.
getCode
().
equals
(
tenant
.
getStatus
()))
{
}
else
if
(
TenantStatus
.
DISABLE
.
getCode
().
equals
(
tenant
.
getStatus
()))
{
log
.
info
(
"登录企业:{} 已被停用."
,
tenant
.
getCompanyName
());
log
.
info
(
"登录企业:{} 已被停用."
,
tenant
.
getCompanyName
());
...
...
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