背景:获取今日所有打卡人员记录,取最新一条打卡时间
思路:根据时间倒叙排序,在根据id分组 建立map映射
LambdaQueryWrapper<LinkPunchRecord> wrapper = new LambdaQueryWrapper<>();
wrapper.orderByDesc(LinkPunchRecord::getCreated);
List<LinkPunchRecord> list = this.list(wrapper);
Map<String, LinkPunchRecordDto> map = collect.stream().collect(Collectors.toMap(LinkPunchRecordDto::getSecurityOfficerId, o -> o, (k1, k2) -> k1));