xuhy
2024-08-22 ab51b6b68ff47c82337dddb9beae334bc28007c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import java.io.IOException;
 
/**
 * iotda消息监听
 */
@Slf4j
@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();
    }
 
}