fix 补全事务注解 异常回滚

(cherry picked from commit 60462822356f50abc62e152191992234979e8b1f)
This commit is contained in:
疯狂的狮子li 2021-12-02 18:50:50 +08:00
parent 2c3f1c28e5
commit 271f6c018e
4 changed files with 15 additions and 15 deletions

View File

@ -120,7 +120,7 @@ public class GenTableServiceImpl implements IGenTableService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void updateGenTable(GenTable genTable) public void updateGenTable(GenTable genTable)
{ {
String options = JSON.toJSONString(genTable.getParams()); String options = JSON.toJSONString(genTable.getParams());
@ -142,7 +142,7 @@ public class GenTableServiceImpl implements IGenTableService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void deleteGenTableByIds(Long[] tableIds) public void deleteGenTableByIds(Long[] tableIds)
{ {
genTableMapper.deleteGenTableByIds(tableIds); genTableMapper.deleteGenTableByIds(tableIds);
@ -155,7 +155,7 @@ public class GenTableServiceImpl implements IGenTableService
* @param tableList 导入表列表 * @param tableList 导入表列表
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void importGenTable(List<GenTable> tableList) public void importGenTable(List<GenTable> tableList)
{ {
String operName = SecurityUtils.getUsername(); String operName = SecurityUtils.getUsername();
@ -281,7 +281,7 @@ public class GenTableServiceImpl implements IGenTableService
* @param tableName 表名称 * @param tableName 表名称
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void synchDb(String tableName) public void synchDb(String tableName)
{ {
GenTable table = genTableMapper.selectGenTableByName(tableName); GenTable table = genTableMapper.selectGenTableByName(tableName);

View File

@ -186,7 +186,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int updateDictType(SysDictType dict) public int updateDictType(SysDictType dict)
{ {
SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId()); SysDictType oldDict = dictTypeMapper.selectDictTypeById(dict.getDictId());

View File

@ -228,7 +228,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int insertRole(SysRole role) public int insertRole(SysRole role)
{ {
// 新增角色信息 // 新增角色信息
@ -243,7 +243,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int updateRole(SysRole role) public int updateRole(SysRole role)
{ {
// 修改角色信息 // 修改角色信息
@ -272,7 +272,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int authDataScope(SysRole role) public int authDataScope(SysRole role)
{ {
// 修改角色信息 // 修改角色信息
@ -338,7 +338,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int deleteRoleById(Long roleId) public int deleteRoleById(Long roleId)
{ {
// 删除角色与菜单关联 // 删除角色与菜单关联
@ -355,7 +355,7 @@ public class SysRoleServiceImpl implements ISysRoleService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int deleteRoleByIds(Long[] roleIds) public int deleteRoleByIds(Long[] roleIds)
{ {
for (Long roleId : roleIds) for (Long roleId : roleIds)

View File

@ -255,7 +255,7 @@ public class SysUserServiceImpl implements ISysUserService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int insertUser(SysUser user) public int insertUser(SysUser user)
{ {
// 新增用户信息 // 新增用户信息
@ -286,7 +286,7 @@ public class SysUserServiceImpl implements ISysUserService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int updateUser(SysUser user) public int updateUser(SysUser user)
{ {
Long userId = user.getUserId(); Long userId = user.getUserId();
@ -308,7 +308,7 @@ public class SysUserServiceImpl implements ISysUserService
* @param roleIds 角色组 * @param roleIds 角色组
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public void insertUserAuth(Long userId, Long[] roleIds) public void insertUserAuth(Long userId, Long[] roleIds)
{ {
userRoleMapper.deleteUserRoleByUserId(userId); userRoleMapper.deleteUserRoleByUserId(userId);
@ -462,7 +462,7 @@ public class SysUserServiceImpl implements ISysUserService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int deleteUserById(Long userId) public int deleteUserById(Long userId)
{ {
// 删除用户与角色关联 // 删除用户与角色关联
@ -479,7 +479,7 @@ public class SysUserServiceImpl implements ISysUserService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional @Transactional(rollbackFor = Exception.class)
public int deleteUserByIds(Long[] userIds) public int deleteUserByIds(Long[] userIds)
{ {
for (Long userId : userIds) for (Long userId : userIds)