package com.casic.controller; import com.alibaba.fastjson.JSON; import com.casic.service.ThirdDataService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Map; @RestController @RequestMapping("/push") @Slf4j public class ThirdDataController { @Autowired private ThirdDataService thirdDataService; /** * 硫化氢订阅接口 * * @param h2sDataMap * @return */ @RequestMapping("/data") public Object h2sData(@RequestBody Map<String, String> h2sDataMap) { System.out.println(JSON.toJSON(h2sDataMap)); return thirdDataService.h2sData(h2sDataMap); } }