package com.ruoyi.oa.service;

import com.ruoyi.oa.domain.OaBusiness;
import com.ruoyi.oa.domain.vo.OaBusinessVo;
import com.ruoyi.oa.domain.bo.OaBusinessBo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.oa.domain.vo.OaProductVo;

import java.util.Collection;
import java.util.List;

/**
 * CRM 商机Service接口
 *
 * @author ruoyi
 * @date 2025-03-12
 */
public interface IOaBusinessService {

    /**
     * 查询CRM 商机
     */
    OaBusinessVo queryById(Long businessId);

    /**
     * 查询CRM 商机列表
     */
    TableDataInfo<OaBusinessVo> queryPageList(OaBusinessBo bo, PageQuery pageQuery);

    /**
     * 查询CRM 商机列表
     */
    List<OaBusinessVo> queryList(OaBusinessBo bo);

    /**
     * 新增CRM 商机
     */
    Boolean insertByBo(OaBusinessBo bo);

    /**
     * 修改CRM 商机
     */
    Boolean updateByBo(OaBusinessBo bo);

    /**
     * 校验并批量删除CRM 商机信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);


    /**
     * 联查商机与产品以及其关联表
     */
    TableDataInfo<OaProductVo> getBusinessProducts(OaBusinessBo bo);

    TableDataInfo<OaBusiness> getBusinessByCustomerId(Long customerId, PageQuery pageQuery);

    void deleteBusiness(Long businessId);


    void setFollow(Long businessId);

    List<OaBusinessVo> queryByIds(Collection<Long> list);
}
