You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
508 B

5 months ago
5 months ago
5 months ago
  1. package com.qyft.ms.device.service;
  2. import cn.hutool.json.JSONUtil;
  3. import com.qyft.ms.device.core.client.TcpClient;
  4. import lombok.RequiredArgsConstructor;
  5. import lombok.extern.slf4j.Slf4j;
  6. import org.springframework.stereotype.Service;
  7. /**
  8. * 设备tcp指令发送服务
  9. */
  10. @Slf4j
  11. @Service
  12. @RequiredArgsConstructor
  13. public class DeviceTcpCMDServiceV2 {
  14. private final TcpClient tcpClient;
  15. public boolean send(Object object) {
  16. return tcpClient.send(JSONUtil.toJsonStr(object));
  17. }
  18. }