diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java index 356cbe7..83ea860 100644 --- a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java +++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysLoginService.java @@ -100,11 +100,13 @@ public class SysLoginService } /*passwordService.validate(user, password); recordLogService.recordLogininfor(username, Constants.LOGIN_SUCCESS, "登录成功");*/ + /****** 2023年6月30日 检查是否配置园区 ******/ if (StringUtils.isEmpty(userInfo.getPoolName())) { recordLogService.recordLogininfor(username, Constants.LOGIN_FAIL, "用户暂未分配园区,请联系管理员"); throw new ServiceException("对不起,您的账号:" + username + " 暂未分配园区"); } + // 非免密 /*if (!noPassword) { passwordService.validate(user, password); diff --git a/ruoyi-auth/src/main/resources/bootstrap.yml b/ruoyi-auth/src/main/resources/bootstrap.yml index 1690218..7119672 100644 --- a/ruoyi-auth/src/main/resources/bootstrap.yml +++ b/ruoyi-auth/src/main/resources/bootstrap.yml @@ -14,12 +14,14 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 file-extension: yml + namespace: highway-mes # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml index 9950eb7..b988a76 100644 --- a/ruoyi-gateway/src/main/resources/bootstrap.yml +++ b/ruoyi-gateway/src/main/resources/bootstrap.yml @@ -14,27 +14,30 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 file-extension: yml + namespace: highway-mes # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - sentinel: - # 取消控制台懒加载 - eager: true - transport: - # 控制台地址 - dashboard: huawei-sentinel:8858 - # nacos配置持久化 - datasource: - ds1: - nacos: - server-addr: huawei-nacos:8848 - dataId: sentinel-ruoyi-gateway - groupId: DEFAULT_GROUP - data-type: json - rule-type: gw-flow +# sentinel: +# # 取消控制台懒加载 +# eager: true +# transport: +# # 控制台地址 +# dashboard: huawei-sentinel:8858 +# # nacos配置持久化 +# datasource: +# ds1: +# nacos: +# server-addr: tencent:8848 +# namespace: mes +# dataId: sentinel-ruoyi-gateway +# groupId: DEFAULT_GROUP +# data-type: json +# rule-type: gw-flow diff --git a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml index 76d1e91..9d46116 100644 --- a/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-file/src/main/resources/bootstrap.yml @@ -14,12 +14,14 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 file-extension: yml + namespace: highway-mes # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml index eb1ad67..a806b6b 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/bootstrap.yml @@ -14,12 +14,14 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 file-extension: yml + namespace: highway-mes # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml index 86c6482..402ac49 100644 --- a/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-job/src/main/resources/bootstrap.yml @@ -14,12 +14,14 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 file-extension: yml + namespace: highway-mes # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 6716118..c2d69c8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; + +import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.core.constant.UserConstants; @@ -42,7 +44,7 @@ public class SysDeptServiceImpl implements ISysDeptService * @return 部门信息集合 */ @Override - @DataScope(deptAlias = "d") + @DS("#header.poolName") public List selectDeptList(SysDept dept) { return deptMapper.selectDeptList(dept); @@ -55,6 +57,7 @@ public class SysDeptServiceImpl implements ISysDeptService * @return 部门树信息集合 */ @Override + @DS("#header.poolName") public List selectDeptTreeList(SysDept dept) { List depts = SpringUtils.getAopProxy(this).selectDeptList(dept); diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml index 1c3872d..a079cf9 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml @@ -14,15 +14,17 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 file-extension: yml # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + namespace: highway-mes mysql: #数据库链接前缀 prev: jdbc:mysql:// diff --git a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml index 520d5b2..89eaedb 100644 --- a/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml +++ b/ruoyi-visual/ruoyi-monitor/src/main/resources/bootstrap.yml @@ -14,11 +14,13 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 + namespace: highway-mes config: # 配置中心地址 - server-addr: huawei-nacos:8848 + server-addr: tencent:8848 # 配置文件格式 + namespace: highway-mes file-extension: yml # 共享配置 shared-configs: