List<User> userList=userList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(User :: getUserid))), ArrayList::new));
java 对list数据 根据某个字段去掉重复数据
原文:https://www.cnblogs.com/zhangxuetao/p/12848935.html