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.FileInfoDto;
import com.sptg.video.cloud.api.entity.FileInfo;
import com.sptg.video.cloud.api.feigns.fallback.FileInfoFeignFallbackFactory;
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 20:44
 */
@FeignClient(value = "smart-house-video-cloud", fallbackFactory = FileInfoFeignFallbackFactory.class)
public interface FileInfoFeign {

    /**
     * 功能描述:录像信息列表
     * @param fileInfoDto 录像信息业务对象（含分页及查询条件）
     * @return ResultBean<Page<FileInfo>>
     *
     *
     */
    @PostMapping(value = "/vcFileInfo/showFileInfoList")
    ResultBean<Page<FileInfo>> showFileInfoList(@RequestBody FileInfoDto fileInfoDto);

    /**
     * 功能描述:根据Id查找录像信息
     * @param id 必填
     * @return FileInfo
     *
     *
     */
    @GetMapping(value = "/vcFileInfo/findFileInfoById/{id}")
    FileInfo findFileInfoById(@PathVariable(value = "id") Long id);

    /**
     * 同步录像信息数据
     * @param fileInfoDto
     * @return
     */
    @PostMapping(value = "/vcFileInfo/sync/list")
    ResultBean<Boolean> syncFileInfoList(@RequestBody FileInfoDto fileInfoDto);

}
