package com.sptg.video.cloud.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.video.cloud.api.dto.DistrictNodeDto;
import com.sptg.video.cloud.api.entity.DistrictNode;
import com.sptg.video.cloud.api.feigns.fallback.DistrictNodeFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zwx
 * @create 2020/10/18 11:53
 */
@FeignClient(value = "smart-house-video-cloud", fallbackFactory = DistrictNodeFallbackFactory.class)
public interface DistrictNodeFeign {

    /**
     * 功能描述:监控点列表
     * @param districtNodeDto 监控点业务对象（含分页及查询条件）
     * @return ResultBean<Page<DistrictNode>>
     *
     *
     */
    @PostMapping(value = "/vcDistrictNode/showDistrictNodeList")
    ResultBean<Page<DistrictNode>> showDistrictNodeList(@RequestBody DistrictNodeDto districtNodeDto);

    /**
     * 功能描述:根据Id查找监控点
     * @param id 必填
     * @return DistrictNode
     *
     *
     */
    @GetMapping(value = "/vcDistrictNode/findDistrictNodeById/{id}")
    DistrictNode findDistrictNodeById(@PathVariable(value = "id")Long id);

    /**
     * 同步监控点数据
     * @param districtNodeDto
     * @return
     */
    @PostMapping(value = "/vcDistrictNode/sync/list")
    ResultBean<Boolean> syncDistrictNodeList(@RequestBody DistrictNodeDto districtNodeDto);
}
