组合排序list

LiveRoomResponse 是一个对象 都懂的


// 需要组合排序list

List<LiveRoomResponse> collect = list(XXXX);

// 状态正序
Comparator<LiveRoomResponse> byLiveStatus = Comparator.comparing(LiveRoomResponse::getLiveStatus);
// 时间倒序
Comparator<LiveRoomResponse> byStartTime = Comparator.comparing(LiveRoomResponse::getStartTime).reversed();

//先状态后时间排序

collect.sort(byLiveStatus.thenComparing(byStartTime));