package com.sptg.estate.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.PageBean;
import com.sptg.estate.api.dto.BaseUser;
import com.sptg.estate.api.dto.UserInfoDto;
import com.sptg.estate.api.feigns.fallback.BaseUserFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * title: BaseUserFeign
 * package: com.sptg.estate.api.feigns
 * description:
 *
 *
 *
 */
@FeignClient(value = "smart-house-estate",fallbackFactory = BaseUserFeignFallbackFactory.class)
public interface BaseUserFeign {

    /**
     * 功能描述: 根据人脸Id获取用户信息
     * @param userId 用户Id
     *
     * @return BaseUser
     *
     *
     */
    @GetMapping(value = "/visitor/getUserById/{userId}")
    BaseUser getUserById(@PathVariable(value = "userId")String userId);

    /**
     * 功能描述: 分页查询服务人员信息列表
     * @param pageBean 分页条件
     * @return Page<UserInfoDto>
     *
     *
     */
    @PostMapping(value = "/visitor/pagingQueryServerUser")
    Page<UserInfoDto> pagingQueryServerUser(@RequestBody PageBean<UserInfoDto,String> pageBean);

    /**
     * 功能描述: 分页查询服务人员信息列表，只获取已启用的人脸
     * @param pageBean 分页条件
     * @return Page<UserInfoDto>
     *
     *
     */
    @PostMapping(value = "/visitor/pagingQueryServerUserEnable")
    Page<UserInfoDto> pagingQueryServerUserEnable(@RequestBody PageBean<UserInfoDto,String> pageBean);
     /**
     * 功能描述: 分页查询住户信息列表
     * @param pageBean 分页条件
     * @return Page<UserInfoDto>
     *
     *
     */
    @PostMapping(value = "/visitor/pagingQueryUser")
    Page<UserInfoDto> pagingQueryUser(@RequestBody PageBean<UserInfoDto,String> pageBean);
    @PostMapping(value = "/visitor/pagingQueryUserEnable")
    Page<UserInfoDto> pagingQueryUserEnable(@RequestBody PageBean<UserInfoDto,String> pageBean);
}
