package com.sptg.estate.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.entity.ProjectCompletion;
import com.sptg.estate.api.feigns.fallback.ProjectCompletionFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * title: MemberFeign
 * package: com.sptg.estate.api.feigns
 * description:物业验收-服务接口
 *
 *               
 *                
 */
@FeignClient(value= "smart-house-estate",fallbackFactory= ProjectCompletionFeignFallbackFactory.class)
public interface ProjectCompletionFeign {
    /**
     * 功能描述:新增
     * @param projectCompletion
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping(value = "/implement/projectCompletion/insert")
    ResultBean<Boolean> insert(@RequestBody ProjectCompletion projectCompletion);
    /**
     * 功能描述:通过项目id查询竣工单信息
     * @param projectId
     * @return ResultBean<ProjectCompletion>
     *               
     *                      
     */
    @PostMapping(value = "/implement/projectCompletion/findByProjectId")
    ResultBean<ProjectCompletion> findByProjectId(@RequestBody Long projectId);
    /**
     * 功能描述:检测项目是否已经有竣工单记录
     * @param projectId
     * @return ResultBean<ProjectCompletion>
     *               
     *                      
     */
    @PostMapping(value = "/implement/projectCompletion/countByProjectId")
    ResultBean<Boolean> countByProjectId(@RequestBody Long projectId);
}
