|
@@ -13,8 +13,10 @@ import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.modules.bank.domain.Exam;
|
|
import com.zhongzheng.modules.bank.domain.Exam;
|
|
import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
import com.zhongzheng.modules.course.domain.CoursePhotoLog;
|
|
import com.zhongzheng.modules.course.domain.CoursePhotoLog;
|
|
|
|
+import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
|
|
import com.zhongzheng.modules.course.service.ICoursePhotoLogService;
|
|
import com.zhongzheng.modules.course.service.ICoursePhotoLogService;
|
|
import com.zhongzheng.modules.course.service.ICourseSectionService;
|
|
import com.zhongzheng.modules.course.service.ICourseSectionService;
|
|
|
|
+import com.zhongzheng.modules.course.vo.CourseChapterSectionVo;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
import com.zhongzheng.modules.course.vo.CourseSectionVo;
|
|
import com.zhongzheng.modules.face.service.IFaceService;
|
|
import com.zhongzheng.modules.face.service.IFaceService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
@@ -91,6 +93,8 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
private IClassGradeUserService iClassGradeUserService;
|
|
private IClassGradeUserService iClassGradeUserService;
|
|
@Autowired
|
|
@Autowired
|
|
private IUserSubscribeService iUserSubscribeService;
|
|
private IUserSubscribeService iUserSubscribeService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ICourseChapterSectionService iCourseChapterSectionService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -270,7 +274,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
queryBo.setChapterId(bo.getChapterId());
|
|
queryBo.setChapterId(bo.getChapterId());
|
|
queryBo.setSectionId(bo.getSectionId());
|
|
queryBo.setSectionId(bo.getSectionId());
|
|
UserStudyRecordVo lastVo = queryLast(queryBo);
|
|
UserStudyRecordVo lastVo = queryLast(queryBo);
|
|
- if(Validator.isEmpty(lastVo)||lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue()){
|
|
|
|
|
|
+ if(Validator.isEmpty(lastVo)||Validator.isEmpty(lastVo.getVideoCurrentTime())||lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue()){
|
|
//如果没有历史数据或者之前播放时长比现在晚,则新增观看记录
|
|
//如果没有历史数据或者之前播放时长比现在晚,则新增观看记录
|
|
this.save(add);
|
|
this.save(add);
|
|
}else{
|
|
}else{
|
|
@@ -388,6 +392,24 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //判断学习顺序1
|
|
|
|
+ @Override
|
|
|
|
+ public boolean checkStudyOrder1(UserStudyRecordQueryBo entity) {
|
|
|
|
+ List<CourseChapterSectionVo> list = iCourseChapterSectionService.getListById(entity.getChapterId());
|
|
|
|
+ Long studyNum = baseMapper.selectChapterSectionRecord(entity);
|
|
|
|
+ int num = studyNum.intValue();
|
|
|
|
+ if(num==list.size()){
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean checkStudyOrder2(UserStudyRecordQueryBo entity) {
|
|
|
|
+
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Boolean updateByEditBo(UserStudyRecordEditBo bo) {
|
|
public Boolean updateByEditBo(UserStudyRecordEditBo bo) {
|
|
UserStudyRecord update = BeanUtil.toBean(bo, UserStudyRecord.class);
|
|
UserStudyRecord update = BeanUtil.toBean(bo, UserStudyRecord.class);
|