|
@@ -1,6 +1,6 @@
|
|
|
package com.fs.course.service.impl;
|
|
package com.fs.course.service.impl;
|
|
|
|
|
|
|
|
-import java.util.Collections;
|
|
|
|
|
|
|
+import java.util.Comparator;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.course.domain.FsUserCourseStudyLog;
|
|
import com.fs.course.domain.FsUserCourseStudyLog;
|
|
@@ -113,11 +113,14 @@ public class FsUserCourseStudyServiceImpl implements IFsUserCourseStudyService
|
|
|
vo.setCourseName(log.getCourseName());
|
|
vo.setCourseName(log.getCourseName());
|
|
|
vo.setVideoId(log.getVideoId());
|
|
vo.setVideoId(log.getVideoId());
|
|
|
vo.setVideoName(log.getVideoName());
|
|
vo.setVideoName(log.getVideoName());
|
|
|
- vo.setProgress(log.getRate().intValue());
|
|
|
|
|
|
|
+ vo.setProgress(log.getRate() != null ? log.getRate().intValue() : 0);
|
|
|
vo.setStudyTime(log.getCreateTime());
|
|
vo.setStudyTime(log.getCreateTime());
|
|
|
}
|
|
}
|
|
|
|
|
+ if (vo.getStudyTime() == null) {
|
|
|
|
|
+ vo.setStudyTime(vo.getUpdateTime() != null ? vo.getUpdateTime() : vo.getCreateTime());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- Collections.sort(list, (o1, o2) -> o2.getStudyTime().compareTo(o1.getStudyTime()));
|
|
|
|
|
|
|
+ list.sort(Comparator.comparing(FsUserCourseStudyListUVO::getStudyTime, Comparator.nullsLast(Comparator.reverseOrder())));
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|