package cn.iocoder.yudao.module.crm.dal.mysql.crmcontract;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.crm.dal.dataobject.crmcontract.CrmContractProductDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 合同产品关系 Mapper
 *
 * @author yshop
 */
@Mapper
public interface CrmContractProductMapper extends BaseMapperX<CrmContractProductDO> {

    default List<CrmContractProductDO> selectListByContractId(Long contractId) {
        return selectList(CrmContractProductDO::getContractId, contractId);
    }

    default int deleteByContractId(Long contractId) {
        return delete(CrmContractProductDO::getContractId, contractId);
    }

}
