瀏覽代碼

Merge branch 'online1' of http://git.dayaedu.com/yonge/mec into online1

yonge 3 年之前
父節點
當前提交
056b782572

+ 1 - 0
mec-im/src/main/java/com/ym/controller/RoomController.java

@@ -164,6 +164,7 @@ public class RoomController{
     @RequestMapping(value = "/device/control", method = RequestMethod.POST)
     public Object controlDevice(@RequestBody ReqDeviceControlData data)
             throws Exception {
+        log.info("device_control: {}",JSONObject.toJSON(data));
         return new BaseResponse<>(roomService.controlDevice(data));
     }
 

+ 2 - 2
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -832,14 +832,14 @@ public class RoomServiceImpl implements RoomService {
             enable = data.getMusicScoreOn();
             if(enable){
                 //保存伴奏音量
-                roomDao.updateSoundVolumeById(roomId,data.getSoundVolume());
+                roomDao.updateSoundVolumeById(roomId,data.getSoundVolume()==null?0:data.getSoundVolume());
             }
         }else if (data.getAccompanimentOn() != null) {
             typeEnum = DeviceTypeEnum.MusicScoreAccompaniment;
             enable = data.getAccompanimentOn();
             if(enable){
                 //保存伴奏音量
-                roomDao.updateSoundVolumeById(roomId,data.getSoundVolume());
+                roomDao.updateSoundVolumeById(roomId,data.getSoundVolume()==null?0:data.getSoundVolume());
             }
         } else {
             throw new ApiException(ErrorEnum.ERR_REQUEST_PARA_ERR);