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.PresetInfoDto;
import com.sptg.video.cloud.api.entity.PresetInfo;
import com.sptg.video.cloud.api.feigns.fallback.PresetInfoFeignFallbackFactory;
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 16:07
 */
@FeignClient(value = "smart-house-video-cloud", fallbackFactory = PresetInfoFeignFallbackFactory.class)
public interface PresetInfoFeign {

    /**
     * 功能描述:预置点列表
     * @param presetInfoDto 预置点业务对象（含分页及查询条件）
     * @return ResultBean<Page<PresetInfo>>
     *
     *
     */
    @PostMapping(value = "/vcPresetInfo/showPresetInfoList")
    ResultBean<Page<PresetInfo>> showPresetInfoList(@RequestBody PresetInfoDto presetInfoDto);

    /**
     * 功能描述:根据Id查找预置点
     * @param id 必填
     * @return PresetInfo
     *
     *
     */
    @GetMapping(value = "/vcPresetInfo/findPresetInfoById/{id}")
    PresetInfo findPresetInfoById(@PathVariable(value = "id")Long id);

    /**
     * 同步预置点数据
     * @param presetInfoDto
     * @return
     */
    @PostMapping(value = "/vcPresetInfo/sync/list")
    ResultBean<Boolean> syncPresetInfoList(@RequestBody PresetInfoDto presetInfoDto);
}
