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