debug:数据隔离

This commit is contained in:
磷叶 2024-11-21 17:12:25 +08:00
parent ad19cfa00d
commit 965c2a1359
3 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}
}
}

View File

@ -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
# 从库数据源

View File

@ -54,7 +54,7 @@ spring:
profiles:
active:
- dev
- druid
- druid-prod
# 文件上传
servlet:
multipart: