提交 e17a411e 编写于 作者: ibiz4j's avatar ibiz4j

dameng批量 堆栈不够

上级 3b1ada61
......@@ -247,16 +247,29 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
int batchsize=500;
if ("dameng".equals(dstype)||"dm".equals(dstype)) {
batchsize=100;
if(list.size()>batchsize)
{
List<List<EntityObj>> splist=LiteDataService.splitList(list, batchsize);
splist.forEach(array->{
baseMapper.saveBatchDm(entityModel, array);
});
}
else
baseMapper.saveBatchDm(entityModel, list);
}
if(list.size()>batchsize)
else
{
List<List<EntityObj>> splist=LiteDataService.splitList(list, batchsize);
splist.forEach(array->{
baseMapper.saveBatch(entityModel, array);
});
if(list.size()>batchsize)
{
List<List<EntityObj>> splist=LiteDataService.splitList(list, batchsize);
splist.forEach(array->{
baseMapper.saveBatch(entityModel, array);
});
}
else
baseMapper.saveBatch(entityModel, list);
}
else
baseMapper.saveBatch(entityModel, list);
return true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册