update 使用instanceof模式匹配, 减少二次转换
This commit is contained in:
parent
0ebcac34e3
commit
5b7c787b31
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user