!333 处理多余的角色删除操作,合并到insertUserRole

Merge pull request !333 from Yjoioooo/5.X
feature/model
疯狂的狮子Li 2 years ago committed by Gitee
commit fd6db2de2c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -330,9 +330,7 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void insertUserAuth(Long userId, Long[] roleIds) { public void insertUserAuth(Long userId, Long[] roleIds) {
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>() insertUserRole(userId, roleIds, true);
.eq(SysUserRole::getUserId, userId));
insertUserRole(userId, roleIds, false);
} }
/** /**

Loading…
Cancel
Save