package com.sptg.estate.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.entity.Contract;
import com.sptg.estate.api.feigns.fallback.ContractFeignFallbackFactory;
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= ContractFeignFallbackFactory.class)
public interface ContractFeign {
    /**
     * 功能描述:通过项目id查询合同信息
     * @param projectId
     * @return ResultBean<Contract>
     *               
     *                      
     */
    @PostMapping(value = "/implement/contract/findByProjectId")
     ResultBean<Contract> findByProjectId(@RequestBody Long projectId);

    /**
     * 功能描述:保存
     * @param contract
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping(value = "/implement/contract/insertByResidentialId")
    ResultBean<Boolean> insertByResidentialId(@RequestBody Contract contract);
    /**
     * 功能描述:修改
     * @param contract
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping(value = "/implement/contract/editByProjectId")
    ResultBean<Boolean> editByProjectId(@RequestBody Contract contract);
}
