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

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.PageBean;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.video.cloud.api.dto.VCApiLogDto;
import com.sptg.video.cloud.api.dto.VCDeviceDto;
import com.sptg.video.cloud.api.entity.VCApiLog;
import com.sptg.video.cloud.api.entity.VCDevice;
import com.sptg.video.cloud.api.feigns.fallback.VCApiLogFeignFallbackFactory;
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/17 16:13
 */
@FeignClient(value = "smart-house-video-cloud", fallbackFactory = VCApiLogFeignFallbackFactory.class)
public interface VCApiLogFeign {

    /**
     * 功能描述: 分页查询接口日志信息
     * @param pageBean 接口日志业务对象（含分页及查询条件）
     * @return ResultBean<Page<VCApiLog>>
     *
     *
     */
    @PostMapping(value = "/vcApiLog/pagingQuery")
    ResultBean<Page<VCApiLog>> pagingQuery(@RequestBody PageBean<VCApiLog, VCApiLogDto> pageBean);

    /**
     * 功能描述:根据Id查找接口日志
     * @param id 必填
     * @return Device
     *
     *
     */
    @GetMapping(value = "/vcApiLog/findById/{id}")
    VCApiLog findById(@PathVariable(value = "id")Long id);


}
