package com.sptg.estate.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.dto.GuestRecordDto;
import com.sptg.estate.api.entity.GuestRecord;
import com.sptg.estate.api.entity.GuestRecord;
import com.sptg.estate.api.feigns.fallback.GuestRecordFeignFallbackFactory;
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;

import java.util.List;
import java.util.Map;

/**
 * title: GuestRecordFeign
 * package: com.sptg.estate.api.feigns
 * description:访客信息登记记录 服务接口
 *
 *
 *
 */
@FeignClient(value = "smart-house-estate",fallbackFactory = GuestRecordFeignFallbackFactory.class)
public interface GuestRecordFeign {

    /**
     * 功能描述:访客信息登记记录查询列表
     * @param guestRecordDto 访客信息登记记录业务对象（含分页及查询条件）
     * @return Page<GuestRecord>
     *
     *
     */
    @PostMapping(value = "/guestRecord/showGuestRecordList")
    Page<GuestRecord> showGuestRecordList(@RequestBody GuestRecordDto guestRecordDto);


    /**
     * 功能描述:新增访客信息登记记录
     * @param guestRecord 访客信息登记记录对象
     * @return ResultBean<GuestRecord>
     *
     *
     */
    @PostMapping(value = "/guestRecord/addGuestRecord")
    ResultBean<GuestRecord> addGuestRecord(@RequestBody GuestRecord guestRecord);

    /**
     * 根据Id 查找访客信息登记记录
     * @param id 必填
     * @return AccessRecords
     *
     *
     */
    @GetMapping(value = "/guestRecord/findGuestRecordById/{id}")
    GuestRecord findGuestRecordById(@PathVariable(value = "id") Long id);

    /**
     * 功能描述:编辑访客信息登记记录
     * @param guestRecordDto 访客信息登记记录对象
     * @return ResultBean<Boolean>
     *
     *
     */
    @PostMapping(value = "/guestRecord/updateGuestRecord")
    ResultBean<Boolean> updateGuestRecord(@RequestBody GuestRecordDto guestRecordDto);

    /**
     * 功能描述:删除访客信息登记记录
     * @param guestRecordDto 访客信息登记记录对象
     * @return ResultBean<Boolean>
     *
     *
     */
    @PostMapping(value = "/guestRecord/deleteGuestRecord")
    ResultBean<Boolean> deleteGuestRecord(@RequestBody GuestRecordDto guestRecordDto);

    /**
     * 功能描述:更新访客信息登记记录审核状态
     * @param guestRecord 访客信息登记记录对象
     * @return ResultBean<Boolean>
     *
     *
     */
    @PostMapping(value = "/guestRecord/updateGuestRecordAuditStatus")
    ResultBean<Boolean> updateGuestRecordAuditStatus(@RequestBody GuestRecord guestRecord);



    /**
     * 功能描述:根据userId查询对应密码记录
     * @param userIds
     * @return ResultBean<GuestRecord>
     *
     *
     */
    @PostMapping(value = "/guestRecord/getListByUserId")
    ResultBean<GuestRecord> getListByUserId(@RequestBody List<Long> userIds);

    /**
     * 功能描述: 通过条件获取访客登记信息记录
     * @param guestRecord
     * @return List<GuestRecord>
     *
     *
     */
    @PostMapping(value = "/guestRecord/getByAuthId")
    List<GuestRecord> findByCondition(@RequestBody GuestRecord guestRecord);



}
