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

3.3.2

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

继承ServiceImpl后调用lambdaQuery()获取到LambdaQueryChainWrapper 再调用func时,会爆出强转异常 java.lang.ClassCastException: com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper cannot be cast to com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper

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

1、demoService extends ServiceImpl 2、demoService.lambdaQuery().func(e -> { if (input.getDemoTypeIds().size() == 1) { e.eq(DemoType::getDemoTypeId, input.getDemoTypeIds().get(0)); } else { e.in(DemoType::getDemoTypeId, input.getDemoTypeIds()); } }).list(); 或者 3、new LambdaQueryChainWrapper<>(demoTypeMapper).func(e -> { if (input.getDemoTypeIds().size() == 1) { e.eq(DemoType::getDemoTypeId, input.getDemoTypeIds().get(0)); } else { e.in(DemoType::getDemoTypeId, input.getDemoTypeIds()); } }).list(); 都会爆出强转异常

报错信息

java.lang.ClassCastException: com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper cannot be cast to com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper

Comment From: miemieYaho

https://github.com/baomidou/mybatis-plus/commit/f51364ee24935e7f2292dd449a46b8db0f57880a