java stream 转字符串数组

var orgs = (String[]) taskOrganizationService.list(new LambdaQueryWrapper<TaskOrganization>()
                        .eq(TaskOrganization::getTaskId, t.getId())
                        .orderByAsc(TaskOrganization::getOrgUuid))
                        .stream().map(x -> x.getOrgUuid())
                        .toArray(String[]::new);

 

posted on 2022-04-25 09:59  空明流光  阅读(1166)  评论(0编辑  收藏  举报

导航