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.CruiseInfoDto;
import com.sptg.video.cloud.api.entity.CruiseInfo;
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:58
 */
@FeignClient(value = "smart-house-video-cloud")
public interface CruiseInfoFeign {

    /**
     * 功能描述:巡航列表
     * @param cruiseInfoDto 巡航业务对象（含分页及查询条件）
     * @return ResultBean<Page<CruiseInfo>>
     *
     *
     */
    @PostMapping(value = "/vcCruiseInfo/showCruiseInfoList")
    ResultBean<Page<CruiseInfo>> showCruiseInfoList(@RequestBody CruiseInfoDto cruiseInfoDto);

    /**
     * 功能描述:根据Id查找巡航
     * @param id 必填
     * @return CruiseInfo
     *
     *
     */
    @GetMapping(value = "/vcCruiseInfo/findCruiseInfoById/{id}")
    CruiseInfo findCruiseInfoById(@PathVariable(value = "id")Long id);

    /**
     * 同步巡航数据
     * @param cruiseInfoDto
     * @return
     */
    @PostMapping(value = "/vcCruiseInfo/sync/list")
    ResultBean<Boolean> syncCruiseInfoList(@RequestBody CruiseInfoDto cruiseInfoDto);
}
