package com.sptg.estate.api.feigns;

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

/**
 * title: ContractFeign
 * package: com.sptg.estate.biz.security
 * description: 立项书-服务接口
 *
 *               
 *                      
 */
@FeignClient(value= "smart-house-estate",fallbackFactory= ProjectBookFeignFallbackFactory.class)
public interface ProjectBookFeign {

    /**
     * 功能描述:新增
     * @param projectBook
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping(value = "/implement/projectBook/insertByResidentialId")
    ResultBean<Boolean> insertByResidentialId(@RequestBody ProjectBook projectBook);

    /**
     * 功能描述:通过项目id查询立项书信息
     * @param projectId
     * @return ResultBean<ProjectBook>
     *               
     *                      
     */
    @PostMapping(value = "/implement/projectBook/findByProjectId")
    ResultBean<ProjectBook> findByProjectId(@RequestBody Long projectId);
    /**
     * 功能描述:修改
     * @param projectBook
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping(value = "/implement/projectBook/editByProjectId")
    ResultBean<Boolean> editByProjectId(@RequestBody ProjectBook projectBook);
}
