/**
 * @filename:ContractTermsServiceImpl 2024-09-03
 * @project KJT v1.0.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.service.sales.service.impl;

import com.trade.service.sales.domain.ContractTerms;
import com.trade.service.sales.mapper.ContractTermsMapper;
import com.trade.service.sales.service.ContractTermsService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description:合同条款服务实现C
 * @version: v1.0.0
 * @author: wanglang
 */
@Service
public class ContractTermsServiceImpl extends ServiceImpl<ContractTermsMapper, ContractTerms> implements ContractTermsService {

    @Override
    public ContractTerms getByContractIdAndType(Long contractId, String contractType) {
        return this.lambdaQuery().eq(ContractTerms::getContractId, contractId)
                .eq(ContractTerms::getContractType, contractType).one();
    }

    @Override
    public ContractTerms getByContractNo(String contractNo) {
        return this.lambdaQuery().eq(ContractTerms::getContractNo, contractNo).one();
    }
}
