List lambda 排序

Comparator<PromotionRule> comparator = Comparator.comparing(PromotionRule::getCreatedTime);
promotionRuleList.sort(comparator.reversed());

猜你喜欢

转载自www.cnblogs.com/mengjianzhou/p/9057104.html
今日推荐