package com.sptg.third.api.feigns.qinlin;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.common.core.enums.Instruct;
import com.sptg.third.api.entity.qinlin.*;
import com.sptg.third.api.feigns.qinlin.fallback.QLinFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zwx
 * @create 2020/12/16 1:37
 */
@FeignClient(value = "smart-house-third", fallbackFactory = QLinFeignFallbackFactory.class)
public interface QLinFeign {

    @PostMapping("/qinLin/addUser")
    public ResultBean<String> addUser(@RequestBody QLinUser qLinUser);

    @PostMapping("/qinLin/deleteUser")
    public ResultBean<String> deleteUser(@RequestBody QLinUser qLinUser);

    @PostMapping("/qinLin/deleteUserPermission")
    public ResultBean<String> deleteUserPermission(@RequestBody QLinUserDevice qLinUserDevice);

    @PostMapping("/qinLin/deleteDevice")
    public ResultBean<String> deleteDevice(@RequestBody QLinDevice qLinDevice);

    @PostMapping("/qinLin/getDeviceInfo")
    public ResultBean<String> getDeviceInfo(@RequestBody QLinDevice qLinDevice);

    @PostMapping("/qinLin/remoteOpenDoor")
    public ResultBean<String> remoteOpenDoor(@RequestBody QLinUserDevice qLinUserDevice);

    @PostMapping("/qinLin/getLogs")
    public ResultBean<String> getLogs(@RequestBody QLinQuery qLinQuery);

    @PostMapping(value = "/qinLin/recordQinLinApiLog")
    public ResultBean<String> recordQinLinApiLog(@RequestBody QLinApiLog qLinApiLog);

    @PostMapping(value = "/qinLin/addCommunity")
    public ResultBean<String> addCommunity(@RequestBody QLinCommunityDevices qLinCommunityDevices);

    @PostMapping(value = "/qinLin/addDevices")
    public ResultBean<String> addDevices(@RequestBody QLinCommunityDevices qLinCommunityDevices);

}
