|
@@ -269,13 +269,13 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
if (Objects.isNull(devInfo)) {
|
|
if (Objects.isNull(devInfo)) {
|
|
throw new BizException(ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorCode(), ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorMessage());
|
|
throw new BizException(ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorCode(), ErrorEnum.DEVICE_IS_NOT_EXIST.getErrorMessage());
|
|
}
|
|
}
|
|
- String tenantName = tblTenantService.getOne(
|
|
|
|
|
|
+ TblTenant tenant = tblTenantService.getOne(
|
|
Wrappers.<TblTenant>lambdaQuery()
|
|
Wrappers.<TblTenant>lambdaQuery()
|
|
- .eq(TblTenant::getTenantId, devInfo.getTenantId()))
|
|
|
|
- .getTenantName();
|
|
|
|
|
|
+ .eq(TblTenant::getTenantId, devInfo.getTenantId()));
|
|
|
|
+
|
|
DeviceDTO dto = new DeviceDTO();
|
|
DeviceDTO dto = new DeviceDTO();
|
|
BeanUtils.copyProperties(devInfo, dto);
|
|
BeanUtils.copyProperties(devInfo, dto);
|
|
- dto.setTenantName(tenantName);
|
|
|
|
|
|
+ dto.setTenantName(tenant == null ? null : tenant.getTenantName());
|
|
return dto;
|
|
return dto;
|
|
}
|
|
}
|
|
|
|
|