//batchLastIndex小于size本身customerAllList 75 batchCount 20 batchLastIndex 20
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.SIMPLE);
sqlSession.insert("com.idengyun.module.customer.dao.NewlyIncreasedToNCDao.saveAllCustomerListToNC",
customerAllList.subList(i, batchLastIndex));
sqlSession.commit();
sqlSession.close(); <insert id="saveAllCustomerListToNC" parameterType="java.util.List"
useGeneratedKeys="true" keyProperty="id">
INSERT INTO [dbo].[custdoc] (
orgcode,
appcustcode,
custname,
custclass,
tel1,
ts,
status
)
VALUES
<foreach collection="list" item="m" index="index" separator=",">
(
#{ m.orgcode },#{ m.appcustcode },#{ m.custname },'C1',#{ m.tel1
},#{m.ts},'0'
)
</foreach>
</insert>
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.SIMPLE);
sqlSession.insert("com.idengyun.module.customer.dao.NewlyIncreasedToNCDao.saveAllCustomerListToNC",
customerAllList.subList(i, batchLastIndex));
sqlSession.commit();
sqlSession.close(); <insert id="saveAllCustomerListToNC" parameterType="java.util.List"
useGeneratedKeys="true" keyProperty="id">
INSERT INTO [dbo].[custdoc] (
orgcode,
appcustcode,
custname,
custclass,
tel1,
ts,
status
)
VALUES
<foreach collection="list" item="m" index="index" separator=",">
(
#{ m.orgcode },#{ m.appcustcode },#{ m.custname },'C1',#{ m.tel1
},#{m.ts},'0'
)
</foreach>
</insert>
解决方案 »
- 如何获得地址栏中的中文
- session的问题
- 为什么取不出客户端取不出服务端返回的String[]数组中的值??????????
- textarea中如何显示从文本文件读取的内容??急等!!
- 为什么我在jbuilder2006中编译idl文件报错,无法编译---Invocation Error. Check your CORBA configuration....
- 有没有办法控制外链的图片不缓存
- JDOGenie 的那个 jdogenie.license 是怎么用的呀?
- 在JAVA中如何实现图片的组合??
- 北京的应届毕业生,在找工作的请进!
- jbuilder8下整合weblogic7的一个问题!(在线等待!)
- java循环遍历类属性 get 和set值方法
- 老师布置作业 看不懂英文机翻更看不懂。。找大佬要了个伪代码 依旧看不懂 大爷们求救啊!
2891条就可以的,不是数据问题,因为插入条数太多