将List<对象>里面的属性取出,按逗号分割时间:2025-03-31 22:12:54List<String> idList = userList.stream().map(User::getId).collect(Collectors.toList()); String ids = StringUtils.join(idList.toArray(), ",");