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.VCAccountDto;
import com.sptg.video.cloud.api.dto.VCApiLogDto;
import com.sptg.video.cloud.api.entity.VCAccount;
import com.sptg.video.cloud.api.entity.VCApiLog;
import com.sptg.video.cloud.api.entity.VCDevice;
import com.sptg.video.cloud.api.feigns.fallback.VCAccountFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author zwx
 * @create 2020/10/16 11:48
 */
@FeignClient(value = "smart-house-video-cloud", fallbackFactory = VCAccountFeignFallbackFactory.class)
public interface VCAccountFeign {

    /**
     * 用户登录，获取token，并保存到数据库
     * @return
     */
    @PostMapping(value = "/vcAccount/login")
    ResultBean<String> login(@RequestBody VCAccount account);
    /**
     * 功能描述:用户列表
     * @param pageBean 用户业务对象（含分页及查询条件）
     * @return ResultBean<Page<Account>>
     *
     *
     */
    @PostMapping(value = "/vcAccount/pagingQuery")
    ResultBean<Page<VCAccount>> pagingQuery(@RequestBody PageBean<VCAccount, VCAccountDto> pageBean);

    /**
     * 获取账号列表
     * @return
     */
    @GetMapping(value = "/vcAccount/getList")
    ResultBean<List<VCAccount>> getList();

    /**
     * 获取账号列表
     * @return
     */
    @PostMapping(value = "/vcAccount/updateBatch")
    ResultBean<String> updateBatch(@RequestBody List<VCAccount> vcAccountList);
}
