package cn.iocoder.yudao.module.contract.api.customercontract;

import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.contract.api.customercontract.dto.CustomerContractDTO;
import cn.iocoder.yudao.module.contract.dal.dataobject.customercontract.CustomerContractDO;
import cn.iocoder.yudao.module.contract.service.customercontract.CustomerContractService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CustomerContractApiImpl implements CustomerContractApi {

    @Resource
    private CustomerContractService customerContractService;

    @Override
    public CustomerContractDTO getCustomerContract(Long id) {
        CustomerContractDO customerContract = customerContractService.getCustomerContract(id);
        return BeanUtils.toBean(customerContract, CustomerContractDTO.class);
    }
}
