当前使用版本(必填,否则不予处理)

3.4.2

该问题是如何引起的?(确定最新版也有问题再提!!!)

使用DataPermissionInterceptor 时候 union all会导致报错

重现步骤(如果有就写完整)

使用union all 两个都有where 条件导致 使用InterceptorIgnore也忽略不了

报错信息

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: java.lang.ClassCastException: net.sf.jsqlparser.statement.select.SetOperationList cannot be cast to net.sf.jsqlparser.statement.select.PlainSelect

Cause: java.lang.ClassCastException: net.sf.jsqlparser.statement.select.SetOperationList cannot be cast to net.sf.jsqlparser.statement.select.PlainSelect

Comment From: larry-ct

MyBatis-Plus 使用DataPermissionInterceptor 时候 union all会导致报错 这里强转报错的

Comment From: larry-ct

查看plainselect 需要使用 MyBatis-Plus 使用DataPermissionInterceptor 时候 union all会导致报错 来做list 并添加

Comment From: qmdx

ok https://github.com/baomidou/mybatis-plus/commit/3bf38132b4a46f9e8386fe45eace0b054b5fb4c9