package com.ruoyi.ibs.list.service;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.ibs.list.domain.*;

import javax.servlet.http.HttpServletResponse;
import java.rmi.ServerException;
import java.util.List;

/**
 * 活动Service接口
 *
 * @author ruoyi
 * @date 2024-09-11
 */
public interface ISysCampaignService {
    /**
     * 查询活动
     *
     * @param id 活动主键
     * @return 活动
     */
    public SysCampaign selectSysCampaignById(String id);

    /**
     * 查询活动列表
     *
     * @param sysCampaign 活动
     * @return 活动集合
     */
    public List<SysCampaign> selectSysCampaignList(String campaignName,String custType,String type);

    /**
     * 查询活动列表
     *
     * @param sysCampaign 活动
     * @return 活动集合
     */
    public List<CustomerList> selectSysCampaignListDetails(String campaignId, CustomerList customerList, String type,Long userManagerId);



    public List<SysCampaignListVo> listCampaign(String custType);

    public void selectSysGroupCustomerListExportByCustIds(HttpServletResponse response,String campaignId, List<String> custIds);

    /**
     * 新增活动
     *
     * @param sysCampaign 活动
     * @return 结果
     */
    public int insertSysCampaign(SysCampaign sysCampaign, List<String> groupId) throws ServerException;


    public int addSysCampaignHis(String campaignId,List<String> custIds  ,List<String> groupIds,String custType) throws ServerException;


    public void distribute(SysCampaign sysCampaign,List<String> distributeRules,List<SysGroupCustomer> sysGroupCustomers,String groupId,String campaignId,List<SysCampaignGroupCustomer> campaignGroupCustomers);

        /**
         * 支行二次推送活动
         *
         * @param groupId 活动
         * @return 结果
         */
    public AjaxResult insertSysCampaign(String groupId, String campaignId, String distributeType, Long[] userIds, Long[]  virtualGridIds, Long[]  layerIds, SysCampaignSecondVo sysCampaignSecondVo) throws ServerException;

    /**
     * 修改活动
     *
     * @param sysCampaign 活动
     * @return 结果
     */
    public int updateSysCampaign(SysCampaign sysCampaign);

    /**
     * 批量删除活动
     *
     * @param ids 需要删除的活动主键集合
     * @return 结果
     */
    public int deleteSysCampaignByIds(Long[] ids);

    /**
     * 删除活动信息
     *
     * @param id 活动主键
     * @return 结果
     */
    public int deleteSysCampaignById(Long id);

    public SysCampaign selectSysCampaignByCampaignId(String campaignId);

    public int selectByCampaignName(String campaignName);

    public List<DeptAndOutlets>  selectDeptAndOutletsByUserIds(List<Long> userIds);

    public List<DeptAndOutlets>  selectDeptAndOutletsByDeptIds(List<Long> deptIds);

    public DeptAndOutlets  selectDeptAndOutletsByUserId(List<DeptAndOutlets> deptAndOutlets,Long userId);

    public DeptAndOutlets  selectDeptAndOutletsByDeptId(List<DeptAndOutlets> deptAndOutlets,Long deptId);

    public List<VisitInfoVo> selectVisitInfoVoList(VisitInfo visitInfo);

    public int updateVisitInfo(VisitInfo visitInfo);
}
