|
@@ -311,6 +311,7 @@ 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){
|
|
@@ -321,6 +322,7 @@ 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){
|
|
@@ -428,7 +430,11 @@ 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()){
|
|
|
//如果没有历史数据或者之前播放时长比现在晚,或者携带照片则新增观看记录
|
|
|
- this.save(add);
|
|
|
+ if(erJianErZao&&Validator.isEmpty(bo.getPhoto())&&(lastVo.getVideoCurrentTime().longValue()>add.getVideoCurrentTime().longValue())){
|
|
|
+ return 0;
|
|
|
+ }else{
|
|
|
+ this.save(add);
|
|
|
+ }
|
|
|
}else{
|
|
|
if(Validator.isNotEmpty(add.getStatus())&&add.getStatus()==1){
|
|
|
lastVo.setStatus(1);
|