UbiTcpController.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.zy.bms.controller.ubi;
  2. import com.zy.bms.common.ServerResponse;
  3. import com.zy.bms.entity.ubi.UbiTcp;
  4. import com.zy.bms.service.ubi.IUbiTcpService;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PostMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import javax.annotation.Resource;
  10. /**
  11. * <p>
  12. * TCP链路设置 前端控制器
  13. * </p>
  14. *
  15. * @author yangxiaokun
  16. * @since 2021-06-01
  17. */
  18. @RestController
  19. @RequestMapping("/bms/tcp")
  20. public class UbiTcpController {
  21. @Resource
  22. private IUbiTcpService tcpSetService;
  23. /**
  24. * 通过设备码查询TCP设置
  25. *
  26. * @param openNum 设备码
  27. */
  28. @GetMapping("listByOpenNum.do")
  29. public ServerResponse listByOpenNum(String openNum) {
  30. return ServerResponse.success(tcpSetService.listByOpenNum(openNum));
  31. }
  32. /**
  33. * 更新 TCP 数据链路设置
  34. */
  35. @PostMapping("update.do")
  36. public ServerResponse updateById(UbiTcp entity) {
  37. return ServerResponse.success(tcpSetService.updateById(entity));
  38. }
  39. }