diff --git a/common-ruoyi/ruoyi-framework/src/main/java/com/ruoyi/framework/util/DataScopeUtil.java b/common-ruoyi/ruoyi-framework/src/main/java/com/ruoyi/framework/util/DataScopeUtil.java index 6ff15ca..3217211 100644 --- a/common-ruoyi/ruoyi-framework/src/main/java/com/ruoyi/framework/util/DataScopeUtil.java +++ b/common-ruoyi/ruoyi-framework/src/main/java/com/ruoyi/framework/util/DataScopeUtil.java @@ -61,7 +61,9 @@ public class DataScopeUtil { if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()) { StringBuilder sqlString = getSqlString(currentUser, deptAlias, userAlias, PermissionContextHolder.getContext()); - return getJoinSqlString(sqlString, ""); + if (StringUtils.isNotBlank(sqlString.toString())) { + return getJoinSqlString(sqlString, null); + } } } } diff --git a/ruoyi-web/src/main/resources/application-druid-prod.yml b/ruoyi-web/src/main/resources/application-druid-prod.yml index 8251f28..2e6032d 100644 --- a/ruoyi-web/src/main/resources/application-druid-prod.yml +++ b/ruoyi-web/src/main/resources/application-druid-prod.yml @@ -6,7 +6,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/yh-prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://8.140.225.147:3306/yh-prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: e1069bd8d7daff94 # 从库数据源 diff --git a/ruoyi-web/src/main/resources/application.yml b/ruoyi-web/src/main/resources/application.yml index 03c5eb8..9db1681 100644 --- a/ruoyi-web/src/main/resources/application.yml +++ b/ruoyi-web/src/main/resources/application.yml @@ -54,7 +54,7 @@ spring: profiles: active: - dev - - druid + - druid-prod # 文件上传 servlet: multipart: