This commit is contained in:
Lemon
2023-12-27 08:17:22 +08:00
parent 2174a550f5
commit a596dea3f2
3 changed files with 12 additions and 14 deletions

View File

@@ -33,9 +33,6 @@ public class CameraController extends BaseController {
@Autowired
private CameraBusinessService cameraBusinessService;
@Autowired
private BootNettyMqttChannelInboundHandler handler;
/**
* 心跳
* @param dto
@@ -62,19 +59,16 @@ public class CameraController extends BaseController {
return result.successResponse();
}
/**
* 给某个 Topic 发消息
* @param dto
*/
@PostMapping("/sendMsg2Topic")
public void sendMsg2Topic(@RequestBody SendMsg2TopicDTO dto) {
try {
cameraBusinessService.sendGroundLockCommand(dto.getSn(), dto.getMsgType(), dto.getMsgPrefix(), dto.getTopic(), dto.getMsgData().toJSONString());
cameraBusinessService.sendGroundLockCommand(dto.getSn(), dto.getMsgType(), dto.getMsgPrefix(), dto.getTopic(), dto.getMsgData());
} catch (Exception e) {
logger.error("发送消息 error, ", e);
}
}
// @PostMapping("/sendMsg2Topic")
// public void sendMsg2Topic(@RequestBody SendMsg2TopicDTO dto) throws InterruptedException {
// ChannelFuture channelFuture = handler.sendMsg(dto.getChannelId(), dto.getTopic(), dto.getRequestMsg().toString());
// System.out.println("123");
// }
}