From e3a34d90678d3df784ad614e682a25a4e999dc59 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 3 May 2026 23:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=90=8C=E6=AD=A5=E3=80=91BOOT=20?= =?UTF-8?q?=E5=92=8C=20CLOUD=20=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/remote/IotDeviceApiImpl.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/service/device/remote/IotDeviceApiImpl.java b/yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/service/device/remote/IotDeviceApiImpl.java index ed46a9afb..0a6c59c1e 100644 --- a/yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/service/device/remote/IotDeviceApiImpl.java +++ b/yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/service/device/remote/IotDeviceApiImpl.java @@ -8,8 +8,6 @@ import cn.iocoder.yudao.module.iot.core.topic.auth.IotDeviceRegisterReqDTO; import cn.iocoder.yudao.module.iot.core.topic.auth.IotDeviceRegisterRespDTO; import cn.iocoder.yudao.module.iot.core.topic.auth.IotSubDeviceRegisterRespDTO; import cn.iocoder.yudao.module.iot.gateway.config.IotGatewayProperties; -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.core.ParameterizedTypeReference; @@ -19,6 +17,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; +import javax.annotation.PostConstruct; +import javax.annotation.Resource; import java.util.List; import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR; @@ -42,34 +42,34 @@ public class IotDeviceApiImpl implements IotDeviceCommonApi { IotGatewayProperties.RpcProperties rpc = gatewayProperties.getRpc(); restTemplate = new RestTemplateBuilder() .rootUri(rpc.getUrl()) - .readTimeout(rpc.getReadTimeout()) - .connectTimeout(rpc.getConnectTimeout()) + .setReadTimeout(rpc.getReadTimeout()) + .setConnectTimeout(rpc.getConnectTimeout()) .build(); } @Override public CommonResult authDevice(IotDeviceAuthReqDTO authReqDTO) { - return doPost("/rpc-api/iot/device/auth", authReqDTO, new ParameterizedTypeReference<>() { }); + return doPost("/rpc-api/iot/device/auth", authReqDTO, new ParameterizedTypeReference>() { }); } @Override public CommonResult getDevice(IotDeviceGetReqDTO getReqDTO) { - return doPost("/rpc-api/iot/device/get", getReqDTO, new ParameterizedTypeReference<>() { }); + return doPost("/rpc-api/iot/device/get", getReqDTO, new ParameterizedTypeReference>() { }); } @Override public CommonResult> getModbusDeviceConfigList(IotModbusDeviceConfigListReqDTO listReqDTO) { - return doPost("/rpc-api/iot/modbus/config-list", listReqDTO, new ParameterizedTypeReference<>() { }); + return doPost("/rpc-api/iot/modbus/config-list", listReqDTO, new ParameterizedTypeReference>>() { }); } @Override public CommonResult registerDevice(IotDeviceRegisterReqDTO reqDTO) { - return doPost("/rpc-api/iot/device/register", reqDTO, new ParameterizedTypeReference<>() { }); + return doPost("/rpc-api/iot/device/register", reqDTO, new ParameterizedTypeReference>() { }); } @Override public CommonResult> registerSubDevices(IotSubDeviceRegisterFullReqDTO reqDTO) { - return doPost("/rpc-api/iot/device/register-sub", reqDTO, new ParameterizedTypeReference<>() { }); + return doPost("/rpc-api/iot/device/register-sub", reqDTO, new ParameterizedTypeReference>>() { }); } private CommonResult doPost(String url, T body,