|
|
@@ -395,4 +395,20 @@ public class IotDeviceServiceImpl implements IIotDeviceService
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int updateIotDeviceExtInfo(IotDevice iotDevice) {
|
|
|
+ String devBid = iotDevice.getDevBid();
|
|
|
+ String extInfo = iotDevice.getExtInfo();
|
|
|
+ if(StringUtils.isEmpty(devBid) || StringUtils.isEmpty(extInfo)){
|
|
|
+ throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"参数不合法");
|
|
|
+ }
|
|
|
+ IotDevice updateIotDevice = selectIotDeviceByDevBid(devBid);
|
|
|
+ if(updateIotDevice == null){
|
|
|
+ throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"设备不存在");
|
|
|
+ }
|
|
|
+ updateIotDevice.setExtInfo(iotDevice.getExtInfo());
|
|
|
+ updateIotDevice.setDevUpdateddate(DateUtils.dateTimeNow());
|
|
|
+ return iotDeviceMapper.updateIotDeviceExtInfo(iotDevice);
|
|
|
+ }
|
|
|
}
|