From ab80f75f65480b4b5da95e9963b4e0fa4a9aa97b Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 13 六月 2025 15:52:19 +0800
Subject: [PATCH] git ch

---
 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