赞
踩
一、排序数据准备,分别对 one、two、three 三个属性进行连续分组内排序
- @Data
- @AllArgsConstructor
- class Aa {
- private Long id;
- private Integer one;
- private Integer two;
- private String three;
- }
-
- List<Aa> aaList = ListUtil.toList(
- null,
- new Aa(1L, 1, 1, "1"),
- new Aa(2L, 1, 3, "2"),
- new Aa(3L, 1, 3, "1"),
- new Aa(4L, 1, 2, "2"),
- new Aa(5L, 1, null, "1"),
- new Aa(6L, 1, 2, "3"),
-
- new Aa(7L, 2, 2, "1"),
- new Aa(8L, 2, 1, "1"),
-
- new Aa(9L, 3, 2, "1"),
- new Aa(10L, 3, 1, ""),
- new Aa(11L, null, 1, "8"),
- new Aa(12L, 3, 3, "2")
- );
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。