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

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.crm.dal.dataobject.crmbusiness.CrmBusinessProductDO;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 商机产品关联 Mapper
 *
 * @author yshop
 */
@Mapper
public interface CrmBusinessProductMapper extends BaseMapperX<CrmBusinessProductDO> {

    default List<CrmBusinessProductDO> selectListByBusinessId(Long businessId) {
        return selectList(CrmBusinessProductDO::getBusinessId, businessId);
    }

    default int deleteByBusinessId(Long businessId) {
        return delete(CrmBusinessProductDO::getBusinessId, businessId);
    }

}
