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.FaceChargeProjectDto;
import com.sptg.estate.api.entity.FaceChargeProject;
import com.sptg.estate.api.feigns.fallback.FaceChargeProjectFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * title: FaceChargeProjectFeign
 * package: com.sptg.estate.api.feigns.fallback
 * description: 人脸收费项目 服务接口
 *
 *
 *
 */
@FeignClient(value = "smart-house-estate",fallbackFactory = FaceChargeProjectFeignFallbackFactory.class)
public interface FaceChargeProjectFeign {

    /**
     * 功能描述:获取全部的人脸收费项目
     * @param dto 查询条件
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/showFaceChargeProjectList")
    ResultBean<Page<FaceChargeProject>> showFaceChargeProjectList(@RequestBody FaceChargeProjectDto dto);

    /**
     * 功能描述:获取全部的人脸收费项目
     * @param residentialId 小区id
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/getListByResidentialId")
    List<FaceChargeProject> getListByResidentialId(@RequestParam("residentialId") Long residentialId);

    /**
     * 功能描述:获取没过期人脸收费项目
     * @param residentialId 小区id
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/getListByResidentialIdAndDate")
    List<FaceChargeProject> getListByResidentialIdAndDate(@RequestParam("residentialId") Long residentialId);
     /**
     * 功能描述:根据小区id 获取全部的人脸收费项目
     * @param residentialId 小区id
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/selectByResidentialId")
    ResultBean<FaceChargeProject> selectByResidentialId(@RequestBody Long residentialId);

    /**
     * 功能描述:获取全部的人脸收费项目
     * @param dto
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/getList")
    List<FaceChargeProject> getList(@RequestBody FaceChargeProjectDto dto);

    /**
     * 功能描述:获取一个收费项目
     * @param dto 查询条件
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/getOneFaceChargeProject")
    ResultBean<FaceChargeProject> getOneFaceChargeProject(@RequestBody FaceChargeProjectDto dto);


    /**
     * 功能描述:获取一个收费项目-用于验证
     * @param dto 查询条件
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/getOneNotInId")
    FaceChargeProject getOneNotInId(@RequestBody FaceChargeProjectDto dto);

    /**
     * 功能描述:获取一个收费项目
     * @param id 人脸项收费项目id
     * @return 返回值
     */
    @PostMapping(value = "/faceChargeProject/getFaceChargeProjectById")
    FaceChargeProject getFaceChargeProjectById(@RequestParam("id") Long id);

    /**
     * 功能描述:新增人脸收费项目
     * @param dto 要新增的项目
     * @return ModelAndView
     *
     */
    @PostMapping(value = "/faceChargeProject/addFaceChargeProject")
    ResultBean<Boolean> addFaceChargeProject(@RequestBody FaceChargeProjectDto dto);

    /**
     * 功能描述:修改人脸收费项目
     * @param dto 要新增的项目
     * @return ModelAndView
     *
     */
    @PostMapping(value = "/faceChargeProject/updateFaceChargeProject")
    ResultBean<Boolean> updateFaceChargeProject(@RequestBody FaceChargeProjectDto dto);

    /**
     * 功能描述:删除人脸收费项目
     * @param dto 要新增的项目
     * @return ModelAndView
     *
     */
    @PostMapping(value = "/faceChargeProject/deleteFaceChargeProject")
    ResultBean<Boolean> deleteFaceChargeProject(@RequestBody FaceChargeProjectDto dto);

    /**
     * 功能描述： 根据oldId获取记录
     * @param oldId 旧数据ID
     * @return FaceChargeProject
     */
    @PostMapping(value = "/faceChargeProject/getByOldId/{oldId}")
    FaceChargeProject getByOldId(@PathVariable(value = "oldId") String oldId);

    /**
     * 功能描述： 批量修改
     * @param List<FaceChargeProject>
     * @return Boolean
     */
    @PostMapping(value = "/faceChargeProject/updateBathFaceChargeProject")
    Boolean updateBathFaceChargeProject(@RequestBody List<FaceChargeProject> faceChargeProjectList);

    /**
     * 功能描述： 上架下架
     * @param dto
     * @return ResultBean<Boolean>
     */
    @PostMapping(value = "/faceChargeProject/putStatusChange")
    ResultBean<Boolean> putStatusChange(@RequestBody FaceChargeProjectDto dto);
}
