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

dameng批量 堆栈不够

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