|
@@ -315,7 +315,6 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Integer insertByAddBo(UserStudyRecordAddBo bo) {
|
|
|
- Boolean erJianErZao = false;
|
|
|
CourseSectionVo courseSectionVo =iCourseSectionService.queryById(bo.getSectionId());
|
|
|
//判断录播拍照是否达标
|
|
|
if(courseSectionVo.getSectionType()==1&&Validator.isNotEmpty(bo.getStatus())&&bo.getStatus()==1){
|
|
@@ -326,7 +325,6 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
String fullName = iCourseBusinessService.queryFullName(queryBo);
|
|
|
if(Validator.isNotEmpty(fullName)){
|
|
|
if(fullName.equals("继续教育二级建造师")||fullName.equals("继续教育二级造价师")){
|
|
|
- erJianErZao = true;
|
|
|
if(Validator.isNotEmpty(courseSectionVo.getDurationTime())||Validator.isNotEmpty(bo.getVideoCurrentTime())){
|
|
|
Long videoTime = 0L;
|
|
|
if(Validator.isNotEmpty(courseSectionVo.getDurationTime())&&courseSectionVo.getDurationTime().longValue()>0){
|
|
@@ -434,7 +432,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
UserStudyRecordVo lastVo = queryLast(queryBo);
|
|
|
if(Validator.isEmpty(lastVo)||Validator.isNotEmpty(bo.getPhoto())||Validator.isEmpty(lastVo.getVideoCurrentTime())||lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue()){
|
|
|
//如果没有历史数据或者之前播放时长比现在晚,或者携带照片则新增观看记录
|
|
|
- if(erJianErZao&&Validator.isEmpty(bo.getPhoto())&&(lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue())){
|
|
|
+ if(Validator.isNotEmpty(lastVo)&&Validator.isNotEmpty(bo.getErJianErZao())&&bo.getErJianErZao()&&Validator.isEmpty(bo.getPhoto())&&(lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue())){
|
|
|
return 0;
|
|
|
}else{
|
|
|
this.save(add);
|
|
@@ -708,6 +706,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
classSectionVo.setModuleId(classPeriodVo.getId());
|
|
|
classSectionVo.setChapterId(classChapterVo.getId());
|
|
|
classSectionVo.setSectionId(classSectionVo.getId());
|
|
|
+ classSectionVo.setType(3L);
|
|
|
sectionList.add(classSectionVo);
|
|
|
}
|
|
|
}
|
|
@@ -723,6 +722,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
|
classSectionVo.setModuleId(0L);
|
|
|
classSectionVo.setChapterId(classPeriodVo.getId());
|
|
|
classSectionVo.setSectionId(classSectionVo.getId());
|
|
|
+ classSectionVo.setType(3L);
|
|
|
sectionList.add(classSectionVo);
|
|
|
}
|
|
|
}
|