批量插入

This commit is contained in:
2025-11-28 18:08:12 +08:00
parent e80bf9a39e
commit 403c872ee3
12 changed files with 22 additions and 27 deletions

View File

@@ -112,7 +112,7 @@ public class ShopProdStatisticServiceImpl extends ServiceImpl<ShopProdStatisticM
if (exists) {
remove(QueryWrapper.create().eq(ShopProdStatistic::getShopId, shopId).eq(ShopProdStatistic::getCreateDay, day));
}
saveBatch(realTimeData);
mapper.insertBatchSelective(realTimeData, 50);
}
}

View File

@@ -57,7 +57,7 @@ public class ShopTableOrderStatisticServiceImpl extends ServiceImpl<ShopTableOrd
.toList();
if (CollUtil.isNotEmpty(realTimeData)) {
remove(QueryWrapper.create().eq(ShopTableOrderStatistic::getShopId, shopId).eq(ShopTableOrderStatistic::getCreateDay, day));
saveBatch(realTimeData);
mapper.insertBatchSelective(realTimeData, 50);
}
}
}