🎈 perf: 优化数据库兼容性

This commit is contained in:
preschooler
2025-12-29 00:29:38 +08:00
parent eb246a2df4
commit b84db7c168
9 changed files with 10 additions and 11 deletions

View File

@@ -136,7 +136,7 @@ public class DeptDataPermissionRule implements DataPermissionRule {
JsonUtils.toJsonString(loginUser), tableName, tableAlias, JsonUtils.toJsonString(deptDataPermission));
// throw new NullPointerException(String.format("LoginUser(%d) Table(%s/%s) 构建的条件为空",
// loginUser.getId(), tableName, tableAlias.getName()));
return EXPRESSION_NULL;
return new EqualsTo(null, null); // WHERE null = null可以保证返回的数据为空
}
if (deptExpression == null) {
return userExpression;