| | |
| | | package com.ruoyi.integration.iotda.utils.listener; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * iotda消息监听 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @RestController |
| | | public class IotMessageListener { |
| | | |
| | | |
| | | |
| | | /** |
| | | * 设备消息监听 |
| | | * @param jsonObject |
| | | * @return |
| | | * @throws IOException |
| | | */ |
| | | @PostMapping(value = "/message") |
| | | public AjaxResult<Integer> add(@RequestBody JSONObject jsonObject) throws IOException { |
| | | System.err.println(jsonObject); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |