Mapped Statements collection does not contain value for org.liu.mapper.DepartmentMapperQueryAll
时间: 2023-12-03 20:37:41 浏览: 79
mybatisMapped报错 Statements collection does not contain value for
根据提供的引用内容,你在继承ServiceImpl类时错误指定成了BaseMapper,将BaseMapper改为自己写的Mapper后,saveBatch()调用成功。而在另一个引用中,使用saveBatch()批量添加时报错:Mapped Statements collection does not contain value for com.baomidou.mybatisplus.core.mapper.BaseMapper.insert。这个错误提示表明Mybatis-plus找不到对应的Mapped Statement,可能是因为你的Mapper文件中没有定义对应的SQL语句。因此,你需要检查一下你的DepartmentMapperQueryAll接口中是否定义了对应的SQL语句。
阅读全文