update 补全事务注解异常

This commit is contained in:
疯狂的狮子Li
2022-02-17 11:15:34 +00:00
committed by Gitee
parent 642cfbda0a
commit 14c412113f
4 changed files with 15 additions and 15 deletions

View File

@@ -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<GenTable> 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);

View File

@@ -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());

View File

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

View File

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