mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	!340 使用instanceof模式匹配, 减少二次转换
Merge pull request !340 from JackyTang/5.X
This commit is contained in:
		@@ -66,8 +66,8 @@ public class PlusDataPermissionInterceptor extends JsqlParserSupport implements
 | 
				
			|||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    protected void processSelect(Select select, int index, String sql, Object obj) {
 | 
					    protected void processSelect(Select select, int index, String sql, Object obj) {
 | 
				
			||||||
        SelectBody selectBody = select.getSelectBody();
 | 
					        SelectBody selectBody = select.getSelectBody();
 | 
				
			||||||
        if (selectBody instanceof PlainSelect) {
 | 
					        if (selectBody instanceof PlainSelect plainSelect) {
 | 
				
			||||||
            this.setWhere((PlainSelect) selectBody, (String) obj);
 | 
					            this.setWhere(plainSelect, (String) obj);
 | 
				
			||||||
        } else if (selectBody instanceof SetOperationList setOperationList) {
 | 
					        } else if (selectBody instanceof SetOperationList setOperationList) {
 | 
				
			||||||
            List<SelectBody> selectBodyList = setOperationList.getSelects();
 | 
					            List<SelectBody> selectBodyList = setOperationList.getSelects();
 | 
				
			||||||
            selectBodyList.forEach(s -> this.setWhere((PlainSelect) s, (String) obj));
 | 
					            selectBodyList.forEach(s -> this.setWhere((PlainSelect) s, (String) obj));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user