Skip to content

Commit

Permalink
fix: 修复在使用数据权限场景时,无 where 语句时的数据权限返回 null Expression 导致SQL错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
houkunlin committed Dec 19, 2022
1 parent a64264d commit a360add
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ protected void processSelectBody(SelectBody selectBody, final String whereSegmen
protected Expression andExpression(Table table, Expression where, final String whereSegment) {
//获得where条件表达式
final Expression expression = buildTableExpression(table, where, whereSegment);
if (null != where) {
if (expression == null) {
return where;
}
if (where != null) {
if (where instanceof OrExpression) {
return new AndExpression(expression, new Parenthesis(where));
} else {
Expand Down

0 comments on commit a360add

Please sign in to comment.