From 396995c0dadd42145ea81b9a534610cc14f6b7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Mon, 8 Dec 2025 14:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=8A=A5=E9=94=99=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/service/impl/ConsStockFlowServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java index ddcd690fe..25028f713 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ConsStockFlowServiceImpl.java @@ -121,7 +121,9 @@ consInfo.setStockNumber(consStockFlow.getAfterNumber()); updateStockList.add(consInfo); } - mapper.insertBatchSelective(insertList, 50); + if (!insertList.isEmpty()) { + mapper.insertBatchSelective(insertList, 50); + } for (ConsInfo consInfo : updateStockList) { consInfoMapper.update(consInfo); }