package com.qiuguo.iot.user.api.controller.tuya;

import com.alibaba.fastjson.JSONObject;
import com.qiuguo.iot.third.query.TuyaQuery;
import com.qiuguo.iot.third.resp.TuyaResponse;
import com.qiuguo.iot.third.service.TuyaDeviceConnector;
import com.qiuguo.iot.third.service.TuyaDeviceService;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * XXX
 *
 * @author weiyachao
 * @since 2023/9/18 17:52
 */

@RestController
@RequestMapping("/tuya")
public class TuyaDeviceController {
    
    @Autowired
    private TuyaDeviceService tuyaDeviceService;
    
    @GetMapping("/set")
    public Mono<TuyaResponse> set(TuyaQuery query) {
        return tuyaDeviceService.controlDevice(query);
    }


}
