New file |
| | |
| | | package com.dy.rtuMw3rd.http4Xjnk; |
| | | |
| | | import com.dy.rtuMw3rd.http4Xjnk.deal.XjnkDealer; |
| | | import com.dy.rtuMw3rd.http4Xjnk.protocol.statusPush.ControllerStatusVo; |
| | | import jakarta.servlet.http.HttpServletRequest; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/3/17 11:24 |
| | | * @Description |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(path="xjnkCtrl") |
| | | public class HttpSvCtrl { |
| | | |
| | | private XjnkDealer dealer ; |
| | | @Autowired |
| | | private void setDealer(XjnkDealer dealer){ |
| | | this.dealer = dealer; |
| | | } |
| | | |
| | | @PostMapping(path = "receive") |
| | | public void receive(HttpServletRequest request, @RequestBody Map<String, Object> body){ |
| | | log.info("接收的数据:", body); |
| | | ControllerStatusVo vo = ControllerStatusVo.may2Vo(body) ; |
| | | this.dealer.dealPush(vo); |
| | | } |
| | | |
| | | } |