소스 검색

feat:云教练评测视频上传

Joburgess 4 년 전
부모
커밋
dcbd4337de
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java

+ 4 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java

@@ -62,8 +62,10 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 	@Override
 	public long insert(SysMusicCompareRecord bean) {
 		long insert = super.insert(bean);
-		studentDao.addStudentCloudStudySequenceDays(bean.getUserId());
-		sysMusicCompareWeekDataService.updateUserWeekTrainData(bean.getUserId(), LocalDate.now().with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue()));
+		if(Objects.nonNull(bean.getUserId())){
+			studentDao.addStudentCloudStudySequenceDays(bean.getUserId());
+			sysMusicCompareWeekDataService.updateUserWeekTrainData(bean.getUserId(), LocalDate.now().with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue()));
+		}
 		return insert;
 	}