package com.ruoyi.oa.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.oa.domain.OaBusiness;
import com.ruoyi.oa.domain.bo.OaBusinessBo;
import com.ruoyi.oa.domain.vo.OaBusinessVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus;
import com.ruoyi.oa.domain.vo.OaProductVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * CRM 商机Mapper接口
 *
 * @author ruoyi
 * @date 2025-03-12
 */
public interface OaBusinessMapper extends BaseMapperPlus<OaBusinessMapper, OaBusiness, OaBusinessVo> {

    /**
     * 联查商机与产品以及其关联表
     */
    List<OaProductVo> getBusinessProducts(OaBusinessBo bo,@Param(Constants.WRAPPER) QueryWrapper<OaBusiness> queryWrapper);


    Page<OaBusinessVo> getBusinessByCustomerId(Long customerId);

    void deleteBusinessById(Long businessId);


    void setFollow(Long businessId);
}
