package com.sptg.gateway.controller.implement;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.common.security.service.SecurityServiceInterface;
import com.sptg.estate.api.entity.Contract;
import com.sptg.estate.api.feigns.ContractFeign;
import com.sptg.permissions.api.entity.Account;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * title: ContractController
 * package: com.sptg.estate.biz.security
 * description: 实施合同-控制器
 *
 *               
 *                      
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/implement/contract")
public class ContractController {

    private final ContractFeign contractFeign;
    /**
     * 功能描述:新增
     * @param contract
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping("/insertByResidentialId")
    public ResultBean<Boolean> insertByResidentialId(Contract contract){
        return this.contractFeign.insertByResidentialId(contract);
    }

    /**
     * 功能描述:修改
     * @param contract
     * @return ResultBean<Boolean>
     *               
     *                      
     */
    @PostMapping("/editByProjectId")
    public ResultBean<Boolean> editByProjectId(Contract contract){
        return this.contractFeign.editByProjectId(contract);
    }

}
