修复openai setProperty 设备编号不存在500异常
parent
050ddb6000
commit
6a0f4c91fb
|
@ -106,6 +106,9 @@ public class OpenDeviceServiceImpl implements OpenDeviceService {
|
||||||
@Override
|
@Override
|
||||||
public String setProperty(String productKey, String deviceName, String args) {
|
public String setProperty(String productKey, String deviceName, String args) {
|
||||||
DeviceInfo deviceRepetition = deviceInfoData.findByDeviceName(deviceName);
|
DeviceInfo deviceRepetition = deviceInfoData.findByDeviceName(deviceName);
|
||||||
|
if (deviceRepetition == null){
|
||||||
|
throw new BizException(ErrCode.DEVICE_NOT_FOUND);
|
||||||
|
}
|
||||||
return deviceCtrlService.setProperty(deviceRepetition.getDeviceId(), JsonUtils.parseObject(args,Map.class), true);
|
return deviceCtrlService.setProperty(deviceRepetition.getDeviceId(), JsonUtils.parseObject(args,Map.class), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue