签到记录

This commit is contained in:
Tankaikai 2024-12-26 21:30:22 +08:00
parent e5ead76f4f
commit 0cd1086c79
1 changed files with 4 additions and 4 deletions

View File

@ -149,11 +149,11 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements
sort = ObjectUtil.defaultIfNull(sort, 0);
List<Map<String, Object>> records = mapIPage.getRecords();
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);
}
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);
}
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);
List<Map<String, Object>> records = mapIPage.getRecords();
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);
}
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);
}
for (Map<String, Object> map:records){