he2802 2 年之前
父节点
当前提交
db997c1947

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -1723,7 +1723,7 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                                     if(Validator.isNotEmpty(classPeriodSectionVo.getStudyEndTime())&&ChapterEndTime.longValue()<classPeriodSectionVo.getStudyEndTime().longValue()){
                                         ChapterEndTime = classPeriodSectionVo.getStudyEndTime();
                                     }
-                                    if(ChapterStartTime==0L||ChapterStartTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue()){
+                                    if((ChapterStartTime==0L&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))||((ChapterStartTime.longValue()>classPeriodSectionVo.getStudyStartTime().longValue())&&Validator.isNotEmpty(classPeriodSectionVo.getStudyStartTime()))){
                                         ChapterStartTime = classPeriodSectionVo.getStudyStartTime();
                                     }
                                 }

+ 3 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -355,15 +355,15 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                                 LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
                                 lqw.eq(UserStudyRecordPhoto::getPeriodId, userPeriodStatusVo.getId());
                                 List<UserStudyRecordPhoto> photoList = userStudyRecordPhotoService.list(lqw);
-                                if(photoList.size()<num){
-                                    throw new CustomException("拍照次数不达标",559);
-                                }
                                 if(photoList.size()>0){
                                     UserStudyRecordPhoto photo = photoList.get(0);
                                     if((DateUtils.getNowTime().longValue()-photo.getCreateTime().longValue())<(videoTime.longValue()-20)){
                                         throw new CustomException("视频学习时长不达标",558);
                                     }
                                 }
+                                if(photoList.size()<num){
+                                    throw new CustomException("拍照次数不达标",559);
+                                }
                             }
 
                         }