|
@@ -10,10 +10,7 @@ import com.ym.mec.biz.dal.config.SoundCompareConfig;
|
|
|
import com.ym.mec.biz.dal.dao.SysMusicScoreAccompanimentDao;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.SysMusicCompareRecord;
|
|
|
-import com.ym.mec.biz.dal.enums.DeviceTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.HeardLevelEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.MusicalErrorTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.WebsocketTypeEnum;
|
|
|
+import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.handler.WebSocketHandler;
|
|
|
import com.ym.mec.biz.service.SoundSocketService;
|
|
|
import com.ym.mec.biz.service.SysMusicCompareRecordService;
|
|
@@ -135,7 +132,7 @@ public class SoundCompareHandler implements WebSocketEventHandler {
|
|
|
musicPitchDetailDto.setDontEvaluating(dc == userMeasureXmlInfoEntry.getValue().size());
|
|
|
userSoundInfoMap.get(phone).getMeasureEndTime().put(userMeasureXmlInfoEntry.getKey(), musicPitchDetailDto);
|
|
|
}
|
|
|
- SysMusicCompareRecord sysMusicCompareRecord = new SysMusicCompareRecord();
|
|
|
+ SysMusicCompareRecord sysMusicCompareRecord = new SysMusicCompareRecord(FeatureType.CLOUD_STUDY_EVALUATION);
|
|
|
sysMusicCompareRecordService.insert(sysMusicCompareRecord);
|
|
|
LOGGER.info("评测记录编号:{}", sysMusicCompareRecord.getId());
|
|
|
userSoundInfoMap.get(phone).setRecordId(sysMusicCompareRecord.getId());
|
|
@@ -296,7 +293,8 @@ public class SoundCompareHandler implements WebSocketEventHandler {
|
|
|
//存储评分数据
|
|
|
if(saveData){
|
|
|
sysMusicCompareRecordService.saveMusicCompareData(phone, userSoundInfoMap.get(phone));
|
|
|
- }else if(Objects.nonNull(userSoundInfoMap.get(phone).getFile())){
|
|
|
+ userSoundInfoMap.get(phone).setRecordId(null);
|
|
|
+ }else if(Objects.nonNull(userSoundInfoMap.get(phone).getRecordId())){
|
|
|
sysMusicCompareRecordService.delete(userSoundInfoMap.get(phone).getRecordId());
|
|
|
}
|
|
|
|