From 9aeb184fb4bd75492f5e511f93d45404a4d9c6c5 Mon Sep 17 00:00:00 2001 From: Guo XIn <371864209@qq.com> Date: Fri, 21 Jul 2023 10:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=90=8E=E7=AB=AF=E6=9C=8D=E5=8A=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E5=9B=9E=E6=BB=9A=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dynacmicform/core/basic/services/DynamicFormService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shandan-basedata/src/main/java/com/keyware/shandan/dynacmicform/core/basic/services/DynamicFormService.java b/shandan-basedata/src/main/java/com/keyware/shandan/dynacmicform/core/basic/services/DynamicFormService.java index 4afecec..27d871e 100644 --- a/shandan-basedata/src/main/java/com/keyware/shandan/dynacmicform/core/basic/services/DynamicFormService.java +++ b/shandan-basedata/src/main/java/com/keyware/shandan/dynacmicform/core/basic/services/DynamicFormService.java @@ -12,6 +12,7 @@ import com.keyware.shandan.dynacmicform.core.db.parser.TableInfoParser; import com.keyware.shandan.dynacmicform.core.db.pojo.Table; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -37,6 +38,7 @@ public class DynamicFormService { * @return boolean * @throws Exception 异常 */ + @Transactional(rollbackFor = Exception.class) public boolean saveForm(FormInfoPo form) throws Exception { FormInfoPo oldForm = formInfoService.getById(form.getId()); Table table = TableInfoParser.parseTable(form); @@ -70,6 +72,7 @@ public class DynamicFormService { * @param id * @return */ + @Transactional(rollbackFor = Exception.class) public boolean delete(Integer id) { FormInfoPo form = formInfoService.getById(id); boolean ok = formInfoService.removeById(id);