From e6ff15690bf92e4c942f279d95cabe726d3cd56a Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期二, 10 六月 2025 15:26:35 +0800 Subject: [PATCH] 提交一把订单 --- server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java index e435028..fc9f3f2 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java @@ -142,6 +142,7 @@ private void dealWorkType(Solutions solutions, Solutions newModel, List<SolutionWorktype> worktypes) { int num =0; + List<SolutionWorktype> typeList = new ArrayList<>(); for(SolutionWorktype type : worktypes) { //鍩虹鐗堟湰 SolutionWorktype w = new SolutionWorktype(); @@ -158,8 +159,12 @@ //鍘嗗彶鐗堟湰鐨勫伐绉嶄俊鎭� SolutionWorktype newType = new SolutionWorktype(); BeanUtils.copyProperties(w, newType); + newType.setId(null); newType.setSolutionId(newModel.getId()); - solutionWorktypeJoinMapper.insert(newType); + typeList.add(newType); + } + if(typeList.size()>0){ + solutionWorktypeJoinMapper.insert(typeList); } } -- Gitblit v1.9.3