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.EstateRepairDto;
import com.sptg.estate.api.entity.EstateRepair;
import com.sptg.estate.api.entity.EstateRepair;
import com.sptg.estate.api.feigns.fallback.EstateRepairFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * title: EstateRepairFeign
 * package: com.sptg.estate.api.feigns
 * description:物业报修-服务接口
 *
 *                
 *                
 */
@FeignClient(value="smart-house-estate",fallbackFactory= EstateRepairFeignFallbackFactory.class)
public interface EstateRepairFeign {
    /**
     * 功能描述:展示物业报修列表
     * @param estateRepairDto
     * @return com.sptg.common.core.beans.ResultBean<com.baomidou.mybatisplus.plugins.Page<com.sptg.estate.api.entity.EstateRepair>>
     *                
     *                      
     */
    @PostMapping(value = "/estateRepair/showEstateRepairList")
    ResultBean<Page<EstateRepair>> showEstateRepairList(@RequestBody EstateRepairDto estateRepairDto);
    /**
     * 功能描述:查询物业报修
     * @param estateRepairDto
     * @return com.sptg.common.core.beans.ResultBean<java.util.List<com.sptg.estate.api.entity.EstateRepair>>
     *                
     *                      
     */
    @PostMapping(value = "/estateRepair/getList")
     ResultBean<List<EstateRepair>> getList(@RequestBody EstateRepairDto estateRepairDto);
    /**
     * 功能描述:添加或编辑物业报修
     * @param estateRepair
     * @return com.sptg.common.core.beans.ResultBean<java.lang.Boolean>
     *                
     *                      
     */
    @PostMapping(value = "/estateRepair/addOrEditEstateRepair")
    ResultBean<EstateRepair> addOrEditEstateRepair(@RequestBody EstateRepair estateRepair);
    /**
     * 功能描述:根据id查询物业报修
     * @param id
     * @return com.sptg.common.core.beans.ResultBean<com.sptg.estate.api.entity.EstateRepair>
     *                
     *                      
     */
    @PostMapping(value = "/estateRepair/findEstateRepairById")
    ResultBean<EstateRepair> findEstateRepairById(@RequestParam(value = "id") long id);
    /**
     * 功能描述:删除物业报修
     * @param id
     * @return com.sptg.common.core.beans.ResultBean<java.lang.Boolean>
     *                
     *                      
     */
    @PostMapping(value = "/estateRepair/deleteEstateRepairById")
    ResultBean<Boolean> deleteEstateRepairById(@RequestParam(value = "id") long id);
    /**
     * 功能描述:批量删除物业报修
     * @param estateRepairDto
     * @return  ResultBean<Boolean>
     *             
     *                      
     */
    @PostMapping(value = "/estateRepair/deleteEstateRepairList")
    ResultBean<Boolean> deleteEstateRepairList(@RequestBody EstateRepairDto estateRepairDto);
}
