Pre Merge pull request !340 from JackyTang/5.X

This commit is contained in:
JackyTang 2023-04-20 02:53:51 +00:00 committed by Gitee
commit e11666be86
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -66,8 +66,8 @@ public class PlusDataPermissionInterceptor extends JsqlParserSupport implements
@Override
protected void processSelect(Select select, int index, String sql, Object obj) {
SelectBody selectBody = select.getSelectBody();
if (selectBody instanceof PlainSelect) {
this.setWhere((PlainSelect) selectBody, (String) obj);
if (selectBody instanceof PlainSelect plainSelect) {
this.setWhere(plainSelect, (String) obj);
} else if (selectBody instanceof SetOperationList setOperationList) {
List<SelectBody> selectBodyList = setOperationList.getSelects();
selectBodyList.forEach(s -> this.setWhere((PlainSelect) s, (String) obj));