update 优化 pr !118 代码结构

feature/model
疯狂的狮子li 3 years ago
parent 7aea32f48b
commit 7eedf37149

@ -125,7 +125,7 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public void updateGenTable(GenTable genTable) {
String options = JsonUtils.toJsonString(genTable.getParams());
genTable.setOptions(options);
@ -144,7 +144,7 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public void deleteGenTableByIds(Long[] tableIds) {
List<Long> ids = Arrays.asList(tableIds);
removeByIds(ids);
@ -157,7 +157,7 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
* @param tableList
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public void importGenTable(List<GenTable> tableList) {
String operName = SecurityUtils.getUsername();
try {
@ -271,7 +271,7 @@ public class GenTableServiceImpl extends ServicePlusImpl<GenTableMapper, GenTabl
* @param tableName
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public void synchDb(String tableName) {
GenTable table = baseMapper.selectGenTableByName(tableName);
List<GenTableColumn> tableColumns = table.getColumns();

@ -189,7 +189,7 @@ public class SysDictTypeServiceImpl extends ServicePlusImpl<SysDictTypeMapper, S
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int updateDictType(SysDictType dict) {
SysDictType oldDict = getById(dict.getDictId());
dictDataMapper.update(null, new LambdaUpdateWrapper<SysDictData>()

@ -215,7 +215,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int insertRole(SysRole role) {
// 新增角色信息
baseMapper.insert(role);
@ -229,7 +229,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int updateRole(SysRole role) {
// 修改角色信息
baseMapper.updateById(role);
@ -256,7 +256,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int authDataScope(SysRole role) {
// 修改角色信息
baseMapper.updateById(role);
@ -315,7 +315,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int deleteRoleById(Long roleId) {
// 删除角色与菜单关联
roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, roleId));
@ -331,7 +331,7 @@ public class SysRoleServiceImpl extends ServicePlusImpl<SysRoleMapper, SysRole,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int deleteRoleByIds(Long[] roleIds) {
for (Long roleId : roleIds) {
checkRoleAllowed(new SysRole(roleId));

@ -242,7 +242,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int insertUser(SysUser user) {
// 新增用户信息
int rows = baseMapper.insert(user);
@ -271,7 +271,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int updateUser(SysUser user) {
Long userId = user.getUserId();
// 删除用户与角色关联
@ -292,7 +292,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
* @param roleIds
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public void insertUserAuth(Long userId, Long[] roleIds) {
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>()
.eq(SysUserRole::getUserId, userId));
@ -435,7 +435,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int deleteUserById(Long userId) {
// 删除用户与角色关联
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId));
@ -451,7 +451,7 @@ public class SysUserServiceImpl extends ServicePlusImpl<SysUserMapper, SysUser,
* @return
*/
@Override
@Transactional(rollbackFor = { Exception.class })
@Transactional(rollbackFor = Exception.class)
public int deleteUserByIds(Long[] userIds) {
for (Long userId : userIds) {
checkUserAllowed(new SysUser(userId));

Loading…
Cancel
Save