From 14c412113f661c4ebb1132424900dd4258dd108c 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: Thu, 17 Feb 2022 11:15:34 +0000 Subject: [PATCH] =?UTF-8?q?update=20=E8=A1=A5=E5=85=A8=E4=BA=8B=E5=8A=A1?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/gen/service/GenTableServiceImpl.java | 8 ++++---- .../com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java | 2 +- .../java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java | 10 +++++----- .../java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) 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 f5c7751..8e6f159 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 @@ -121,7 +121,7 @@ public class GenTableServiceImpl implements IGenTableService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void updateGenTable(GenTable genTable) { String options = JSON.toJSONString(genTable.getParams()); @@ -143,7 +143,7 @@ public class GenTableServiceImpl implements IGenTableService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void deleteGenTableByIds(Long[] tableIds) { genTableMapper.deleteGenTableByIds(tableIds); @@ -156,7 +156,7 @@ public class GenTableServiceImpl implements IGenTableService * @param tableList 导入表列表 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void importGenTable(List tableList) { String operName = SecurityUtils.getUsername(); @@ -282,7 +282,7 @@ public class GenTableServiceImpl implements IGenTableService * @param tableName 表名称 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void synchDb(String tableName) { GenTable table = genTableMapper.selectGenTableByName(tableName); diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java index 11e28b8..e0e672c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java @@ -189,7 +189,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int updateDictType(SysDictType dict) { SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId()); diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index df72a12..916e989 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -228,7 +228,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int insertRole(SysRole role) { // 新增角色信息 @@ -243,7 +243,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int updateRole(SysRole role) { // 修改角色信息 @@ -272,7 +272,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int authDataScope(SysRole role) { // 修改角色信息 @@ -338,7 +338,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int deleteRoleById(Long roleId) { // 删除角色与菜单关联 @@ -355,7 +355,7 @@ public class SysRoleServiceImpl implements ISysRoleService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int deleteRoleByIds(Long[] roleIds) { for (Long roleId : roleIds) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 43d6e8c..fcc9033 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -252,7 +252,7 @@ public class SysUserServiceImpl implements ISysUserService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int insertUser(SysUser user) { // 新增用户信息 @@ -283,7 +283,7 @@ public class SysUserServiceImpl implements ISysUserService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int updateUser(SysUser user) { Long userId = user.getUserId(); @@ -305,7 +305,7 @@ public class SysUserServiceImpl implements ISysUserService * @param roleIds 角色组 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void insertUserAuth(Long userId, Long[] roleIds) { userRoleMapper.deleteUserRoleByUserId(userId); @@ -459,7 +459,7 @@ public class SysUserServiceImpl implements ISysUserService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int deleteUserById(Long userId) { // 删除用户与角色关联 @@ -476,7 +476,7 @@ public class SysUserServiceImpl implements ISysUserService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int deleteUserByIds(Long[] userIds) { for (Long userId : userIds)