Java8 Stream Function

            //.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()


            Map<Integer, WorkOrderOperationLogDO> workOrderIdLastestEnterSeaTimeWorkOrderOperationLogDOMap =
                    workOrderOperationLogDOs.parallelStream().collect(
                    Collectors.toMap(WorkOrderOperationLogDO::getWorkOrderId,
                            Function.identity(), (c1, c2) ->
                            c1.getCreatedAt().getTime() > c2.getCreatedAt().getTime() ? c1 : c2));
            

 

posted @ 2021-11-30 16:32  任国强  阅读(173)  评论(0编辑  收藏  举报