mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 优化通过角色ID查询用户逻辑
This commit is contained in:
		@@ -42,7 +42,7 @@ import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 用户 业务层处理
 | 
			
		||||
@@ -680,10 +680,9 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
 | 
			
		||||
            new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getRoleId, roleIds));
 | 
			
		||||
 | 
			
		||||
        // 获取用户ID列表
 | 
			
		||||
        List<Long> userIds = userRoles.stream()
 | 
			
		||||
            .map(SysUserRole::getUserId).distinct().collect(Collectors.toList());
 | 
			
		||||
        Set<Long> userIds = StreamUtils.toSet(userRoles, SysUserRole::getUserId);
 | 
			
		||||
 | 
			
		||||
        return selectListByIds(userIds);
 | 
			
		||||
        return selectListByIds(new ArrayList<>(userIds));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user