mybatis plus saveBatch报错问题
sessionRecordHumanService.saveBatch(dataList); 具体报错如下:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.xdf.data.service.api.dao.tidb.SessionRecordHumanMapper.insert
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.data.service.api.dao.tidb.SessionRecordHumanMapper.insert
@Service public class SessionRecordHumanServiceImpl extends ServiceImpl<SessionRecordHumanMapper, SessionRecordHumanDO> implements SessionRecordHumanService { }
测试环境没问题,发布到生产环境报错如上,后按如下修改解决
@Service public class SessionRecordHumanServiceImpl extends ServiceImpl<SessionRecordHumanMapper, SessionRecordHumanDO> implements SessionRecordHumanService { @Override public void saveBatch(List<SessionRecordHumanDO> list) { super.saveBatch(list); } }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步