签到记录
This commit is contained in:
@@ -149,11 +149,11 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements
|
|||||||
sort = ObjectUtil.defaultIfNull(sort, 0);
|
sort = ObjectUtil.defaultIfNull(sort, 0);
|
||||||
List<Map<String, Object>> records = mapIPage.getRecords();
|
List<Map<String, Object>> records = mapIPage.getRecords();
|
||||||
if(sort != null && sort == 1){
|
if(sort != null && sort == 1){
|
||||||
records = records.stream().sorted(Comparator.comparingInt(item -> (int)item.get("goodNum"))).collect(Collectors.toList());
|
records = records.stream().sorted(Comparator.comparingLong(item -> (long)ObjectUtil.defaultIfNull(item.get("goodNum"),0L))).collect(Collectors.toList());
|
||||||
Collections.reverse(records);
|
Collections.reverse(records);
|
||||||
}
|
}
|
||||||
if(sort != null && sort == 2){
|
if(sort != null && sort == 2){
|
||||||
records = records.stream().sorted(Comparator.comparingInt(item -> (int)item.get("weekGoodNum"))).collect(Collectors.toList());
|
records = records.stream().sorted(Comparator.comparingLong(item -> (long)ObjectUtil.defaultIfNull(item.get("weekGoodNum"),0L))).collect(Collectors.toList());
|
||||||
Collections.reverse(records);
|
Collections.reverse(records);
|
||||||
}
|
}
|
||||||
for (Map<String, Object> map:records){
|
for (Map<String, Object> map:records){
|
||||||
@@ -184,11 +184,11 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements
|
|||||||
sort, startTime, endTime, userId, isPrice, over, wxCourse, dyCourse,wxShow,dyShow);
|
sort, startTime, endTime, userId, isPrice, over, wxCourse, dyCourse,wxShow,dyShow);
|
||||||
List<Map<String, Object>> records = mapIPage.getRecords();
|
List<Map<String, Object>> records = mapIPage.getRecords();
|
||||||
if(sort != null && sort == 1){
|
if(sort != null && sort == 1){
|
||||||
records = records.stream().sorted(Comparator.comparingInt(item -> (int)item.get("goodNum"))).collect(Collectors.toList());
|
records = records.stream().sorted(Comparator.comparingLong(item -> (long)ObjectUtil.defaultIfNull(item.get("goodNum"),0L))).collect(Collectors.toList());
|
||||||
Collections.reverse(records);
|
Collections.reverse(records);
|
||||||
}
|
}
|
||||||
if(sort != null && sort == 2){
|
if(sort != null && sort == 2){
|
||||||
records = records.stream().sorted(Comparator.comparingInt(item -> (int)item.get("weekGoodNum"))).collect(Collectors.toList());
|
records = records.stream().sorted(Comparator.comparingLong(item -> (long)ObjectUtil.defaultIfNull(item.get("weekGoodNum"),0L))).collect(Collectors.toList());
|
||||||
Collections.reverse(records);
|
Collections.reverse(records);
|
||||||
}
|
}
|
||||||
for (Map<String, Object> map:records){
|
for (Map<String, Object> map:records){
|
||||||
|
|||||||
Reference in New Issue
Block a user