|
@@ -378,14 +378,16 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
//判断录播拍照是否达标
|
|
//判断录播拍照是否达标
|
|
if(courseSectionVo.getSectionType()==1&&Validator.isNotEmpty(bo.getStatus())&&bo.getStatus()==1){
|
|
if(courseSectionVo.getSectionType()==1&&Validator.isNotEmpty(bo.getStatus())&&bo.getStatus()==1){
|
|
if(Validator.isNotEmpty(goodsVo)){
|
|
if(Validator.isNotEmpty(goodsVo)){
|
|
- ClassGrade grade = iClassGradeService.getOne(new LambdaQueryWrapper<ClassGrade>()
|
|
|
|
- .eq(ClassGrade::getGradeId, bo.getGradeId()));
|
|
|
|
- if(Validator.isNotEmpty(grade)){
|
|
|
|
- if(Validator.isNotEmpty(grade.getClassEndTime())&&DateUtils.getNowTime()>grade.getClassEndTime()){
|
|
|
|
- throw new CustomException("班级已过期",601);
|
|
|
|
- }
|
|
|
|
- if(Validator.isNotEmpty(grade.getClassStartTime())&&DateUtils.getNowTime()<grade.getClassStartTime()){
|
|
|
|
- throw new CustomException("班级未开始",601);
|
|
|
|
|
|
+ if(Validator.isNotEmpty(bo.getGradeId())){
|
|
|
|
+ ClassGrade grade = iClassGradeService.getOne(new LambdaQueryWrapper<ClassGrade>()
|
|
|
|
+ .eq(ClassGrade::getGradeId, bo.getGradeId()));
|
|
|
|
+ if(Validator.isNotEmpty(grade)){
|
|
|
|
+ if(Validator.isNotEmpty(grade.getClassEndTime())&&DateUtils.getNowTime()>grade.getClassEndTime()){
|
|
|
|
+ throw new CustomException("班级已过期",601);
|
|
|
|
+ }
|
|
|
|
+ if(Validator.isNotEmpty(grade.getClassStartTime())&&DateUtils.getNowTime()<grade.getClassStartTime()){
|
|
|
|
+ throw new CustomException("班级未开始",601);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(Validator.isNotEmpty(fullName)){
|
|
if(Validator.isNotEmpty(fullName)){
|
|
@@ -1677,6 +1679,18 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
|
|
redisCache.setCacheObject(key, 100L,2, TimeUnit.SECONDS);
|
|
redisCache.setCacheObject(key, 100L,2, TimeUnit.SECONDS);
|
|
|
|
|
|
if ( baseMapper.selectStudyRecord(bakStudyRecord) < 1) {
|
|
if ( baseMapper.selectStudyRecord(bakStudyRecord) < 1) {
|
|
|
|
+ if(Validator.isNotEmpty(bo.getGradeId())){
|
|
|
|
+ ClassGrade grade = iClassGradeService.getOne(new LambdaQueryWrapper<ClassGrade>()
|
|
|
|
+ .eq(ClassGrade::getGradeId, bo.getGradeId()));
|
|
|
|
+ if(Validator.isNotEmpty(grade)){
|
|
|
|
+ if(Validator.isNotEmpty(grade.getClassEndTime())&&DateUtils.getNowTime()>grade.getClassEndTime()){
|
|
|
|
+ throw new CustomException("班级已过期",601);
|
|
|
|
+ }
|
|
|
|
+ if(Validator.isNotEmpty(grade.getClassStartTime())&&DateUtils.getNowTime()<grade.getClassStartTime()){
|
|
|
|
+ throw new CustomException("班级未开始",601);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
UserPeriod userPeriod = new UserPeriod();
|
|
UserPeriod userPeriod = new UserPeriod();
|
|
userPeriod.setUserId(entity.getUserId());
|
|
userPeriod.setUserId(entity.getUserId());
|
|
userPeriod.setCourseId(entity.getCourseId());
|
|
userPeriod.setCourseId(entity.getCourseId());
|