mybatis plus saveBatch報錯問題

LUDAGOGO發表於2024-03-14


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);
    }
}

相關文章