Browse Source

feat:云教练评测视频上传

Joburgess 4 năm trước cách đây
mục cha
commit
dcbd4337de

+ 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;
 	}