无关风月
2025-01-07 030eb0ac289f56be371d89646208e2e366ea440f
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/produce/IotMessageProduce.java
@@ -39,14 +39,11 @@
     */
    @PostMapping("/sendMessage")
    public String sendMessage(String code, String name, JSONObject message){
        log.info("消息下发至设备:code={},name={},message={}", code, name, message);
        CreateMessageRequest request = new CreateMessageRequest();
        System.err.println(code);
        System.err.println(JSONObject.toJSONString(config));
        if(config.getTest() && code.equals(config.getTestDriverCode())){
            request.withDeviceId(config.getTestDeviceId());
        }else{
            request.withDeviceId(config.getDeviceId());
        }
        request.withDeviceId(code);
        DeviceMessageRequest body = new DeviceMessageRequest();
        body.withMessageId(UUID.randomUUID().toString());
        body.withName(name);