Commit a0a245aa authored by tanyang's avatar tanyang

bug 修复 新增租户管理员角色

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