正在显示
1 个修改的文件
包含
12 行增加
和
1 行删除
| @@ -10,6 +10,8 @@ import com.ruoyi.common.core.domain.ApiName; | @@ -10,6 +10,8 @@ import com.ruoyi.common.core.domain.ApiName; | ||
| 10 | import com.ruoyi.common.core.domain.DeviceCommandApi; | 10 | import com.ruoyi.common.core.domain.DeviceCommandApi; |
| 11 | import com.ruoyi.common.core.domain.DeviceCommandApiParameter; | 11 | import com.ruoyi.common.core.domain.DeviceCommandApiParameter; |
| 12 | import com.zhonglai.luhui.dao.service.PublicService; | 12 | import com.zhonglai.luhui.dao.service.PublicService; |
| 13 | +import com.zhonglai.luhui.device.domain.IotDevice; | ||
| 14 | +import com.zhonglai.luhui.device.mapper.IotDeviceMapper; | ||
| 13 | import com.zhonglai.luhui.device.service.IIotDeviceService; | 15 | import com.zhonglai.luhui.device.service.IIotDeviceService; |
| 14 | import com.zhonglai.luhui.rocketmq.service.RocketMqService; | 16 | import com.zhonglai.luhui.rocketmq.service.RocketMqService; |
| 15 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -31,6 +33,9 @@ public class IotTerminalServiceImpl implements IIotTerminalService | @@ -31,6 +33,9 @@ public class IotTerminalServiceImpl implements IIotTerminalService | ||
| 31 | private IotTerminalMapper iotTerminalMapper; | 33 | private IotTerminalMapper iotTerminalMapper; |
| 32 | 34 | ||
| 33 | @Autowired | 35 | @Autowired |
| 36 | + private IotDeviceMapper iotDeviceMapper; | ||
| 37 | + | ||
| 38 | + @Autowired | ||
| 34 | private PublicService publicService; | 39 | private PublicService publicService; |
| 35 | 40 | ||
| 36 | @Autowired | 41 | @Autowired |
| @@ -44,7 +49,13 @@ public class IotTerminalServiceImpl implements IIotTerminalService | @@ -44,7 +49,13 @@ public class IotTerminalServiceImpl implements IIotTerminalService | ||
| 44 | @Override | 49 | @Override |
| 45 | public IotTerminal selectIotTerminalById(String id) | 50 | public IotTerminal selectIotTerminalById(String id) |
| 46 | { | 51 | { |
| 47 | - return iotTerminalMapper.selectIotTerminalById(id); | 52 | + IotTerminal iotTerminal = iotTerminalMapper.selectIotTerminalById(id); |
| 53 | + if(null != iotTerminal) | ||
| 54 | + { | ||
| 55 | + IotDevice iotDevice = iotDeviceMapper.selectIotDeviceByClient_id(iotTerminal.getDevice_id()); | ||
| 56 | + iotTerminal.setIotDevice(iotDevice); | ||
| 57 | + } | ||
| 58 | + return iotTerminal; | ||
| 48 | } | 59 | } |
| 49 | 60 | ||
| 50 | /** | 61 | /** |
-
请 注册 或 登录 后发表评论