From 2bade9c472d80be1a9df6e2e787ec5ac003823df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Fri, 17 Jun 2022 10:36:40 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=20=E4=B8=9A=E5=8A=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E5=A2=9E=E5=8A=A0=E4=BA=8B=E5=8A=A1=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/gen/service/GenTableServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java index 0a33b2d5..b4e79bc0 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java +++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/service/GenTableServiceImpl.java @@ -33,6 +33,7 @@ import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.io.ByteArrayOutputStream; import java.io.File; @@ -171,6 +172,7 @@ public class GenTableServiceImpl implements IGenTableService { * @param genTable 业务信息 * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public void updateGenTable(GenTable genTable) { String options = JsonUtils.toJsonString(genTable.getParams()); @@ -189,6 +191,7 @@ public class GenTableServiceImpl implements IGenTableService { * @param tableIds 需要删除的数据ID * @return 结果 */ + @Transactional(rollbackFor = Exception.class) @Override public void deleteGenTableByIds(Long[] tableIds) { List ids = Arrays.asList(tableIds); @@ -201,6 +204,7 @@ public class GenTableServiceImpl implements IGenTableService { * * @param tableList 导入表列表 */ + @Transactional(rollbackFor = Exception.class) @Override public void importGenTable(List tableList) { String operName = LoginHelper.getUsername(); @@ -326,6 +330,7 @@ public class GenTableServiceImpl implements IGenTableService { * * @param tableName 表名称 */ + @Transactional(rollbackFor = Exception.class) @Override public void synchDb(String tableName) { GenTable table = baseMapper.selectGenTableByName(tableName);