Commit 99c107f787ebdbbf8ddd04f12c1b405a321c0a29

Authored by YunaiV
1 parent 95b13458

【修复】IoT 网关调用 biz 的设备注册 / 子设备注册 RPC URL 缺前缀,导致动态注册失败

yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/service/device/remote/IotDeviceApiImpl.java
@@ -71,12 +71,12 @@ public class IotDeviceApiImpl implements IotDeviceCommonApi { @@ -71,12 +71,12 @@ public class IotDeviceApiImpl implements IotDeviceCommonApi {
71 71
72 @Override 72 @Override
73 public CommonResult<IotDeviceRegisterRespDTO> registerDevice(IotDeviceRegisterReqDTO reqDTO) { 73 public CommonResult<IotDeviceRegisterRespDTO> registerDevice(IotDeviceRegisterReqDTO reqDTO) {
74 - return doPost("/register", reqDTO, new ParameterizedTypeReference<>() { }); 74 + return doPost("/rpc-api/iot/device/register", reqDTO, new ParameterizedTypeReference<>() { });
75 } 75 }
76 76
77 @Override 77 @Override
78 public CommonResult<List<IotSubDeviceRegisterRespDTO>> registerSubDevices(IotSubDeviceRegisterFullReqDTO reqDTO) { 78 public CommonResult<List<IotSubDeviceRegisterRespDTO>> registerSubDevices(IotSubDeviceRegisterFullReqDTO reqDTO) {
79 - return doPost("/register-sub", reqDTO, new ParameterizedTypeReference<>() { }); 79 + return doPost("/rpc-api/iot/device/register-sub", reqDTO, new ParameterizedTypeReference<>() { });
80 } 80 }
81 81
82 private <T, R> CommonResult<R> doPost(String url, T body, 82 private <T, R> CommonResult<R> doPost(String url, T body,