|
@@ -269,7 +269,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
}
|
|
|
|
|
|
// 记录操作日志
|
|
|
- logService.saveLog(OprLogType.UNBLIND_DEVICE.getCode(), logContent);
|
|
|
+ logService.saveLog(Long.valueOf(devId),OprLogType.UNBLIND_DEVICE.getCode(), logContent);
|
|
|
return updateFlag;
|
|
|
}
|
|
|
|
|
@@ -298,7 +298,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
devInfo.setActiveTime(LocalDateTime.now());
|
|
|
devInfoService.updateById(devInfo);
|
|
|
|
|
|
- logService.saveLog(OprLogType.BIND_DEVICE.getCode(), String.format("用户 %d 绑定设备 %s", request.getUserId(), request.getClientId()));
|
|
|
+ logService.saveLog(devInfo.getDevId(),OprLogType.BIND_DEVICE.getCode(), String.format("用户 %d 绑定设备 %s", request.getUserId(), request.getClientId()));
|
|
|
|
|
|
//5.返回绑定结果和设备主键id
|
|
|
DeviceDTO result = new DeviceDTO();
|
|
@@ -387,7 +387,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
throw new BizException(ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorCode(), ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorMessage());
|
|
|
}
|
|
|
|
|
|
- logService.saveLog(OprLogType.UPDATE_DEVICE.getCode(), devInfo);
|
|
|
+ logService.saveLog(devInfo.getDevId(),OprLogType.UPDATE_DEVICE.getCode(), devInfo);
|
|
|
|
|
|
//2.更新数据
|
|
|
devInfo.setTenantId(params.getTenantId());
|
|
@@ -468,7 +468,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
throw new BizException(ErrorEnum.DEVICE_UPDATE_FAIL.getErrorCode(), ErrorEnum.DEVICE_UPDATE_FAIL.getErrorMessage());
|
|
|
}
|
|
|
|
|
|
- logService.saveLog(OprLogType.UPDATE_DEVICE.getCode(), params);
|
|
|
+ logService.saveLog(devInfo.getDevId(),OprLogType.UPDATE_DEVICE.getCode(), params);
|
|
|
|
|
|
//5.通过MQTT把信息参数发送到设备
|
|
|
mqttSend.sendDeviceParamsToMqtt(devInfo.getClientId(), params);
|
|
@@ -645,7 +645,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
}
|
|
|
|
|
|
// 记录操作日志
|
|
|
- logService.saveLog(OprLogType.UPDATE_ROOM.getCode(), param);
|
|
|
+ logService.saveLog(param.getDevId(),OprLogType.UPDATE_ROOM.getCode(), param);
|
|
|
|
|
|
return true;
|
|
|
}
|
|
@@ -801,7 +801,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
devShareService.removeById(devShare);
|
|
|
|
|
|
//3.取消分享记录到日志
|
|
|
- logService.saveLog(OprLogType.CANCEL_SHARE.getCode(), shareId);
|
|
|
+ logService.saveLog(devShare.getDevId(),OprLogType.CANCEL_SHARE.getCode(), shareId);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -820,7 +820,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
devShareService.updateById(devShare);
|
|
|
|
|
|
//3.记录操作日志
|
|
|
- logService.saveLog(OprLogType.UPDATE_DEVICE_SHARE_PERMISSION.getCode(), param);
|
|
|
+ logService.saveLog(devShare.getDevId(),OprLogType.UPDATE_DEVICE_SHARE_PERMISSION.getCode(), param);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1137,7 +1137,7 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
devInfo.getDevId(), // 转移的设备id
|
|
|
userInfo.getUserId() // 转移后的用户id
|
|
|
);
|
|
|
- logService.saveLog(OprLogType.DEVICE_TRANSFER.getCode(), logContent);
|
|
|
+ logService.saveLog(param.getDevId(),OprLogType.DEVICE_TRANSFER.getCode(), logContent);
|
|
|
return true;
|
|
|
}
|
|
|
|