package com.crm.manager.dao.mapper;

import com.crm.rely.backend.core.entity.custom.allocation.roster.CustomAllocationRosterClickByCountrysEntity;
import com.crm.rely.backend.core.entity.custom.allocation.roster.CustomAllocationRosterClickEntity;
import com.crm.rely.backend.core.entity.custom.allocation.roster.CustomAllocationRosterSearchEntity;
import com.crm.rely.backend.core.pojo.table.CustomAllocationRosterTable;
import com.crm.rely.backend.core.pojo.view.CustomAllocationRosterView;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author houn
 * @Date 2023/2/20 12:33
 * @PackageName:com.crm.manager.dao.mapper
 * @ClassName: CustomAllocationRosterMapper
 * @Description: TODO
 */
@Repository
public interface CustomAllocationRosterMapper {

    List<CustomAllocationRosterView> selectList(CustomAllocationRosterSearchEntity searchList);

    List<CustomAllocationRosterView> selectCsvList(CustomAllocationRosterSearchEntity searchList);

    int selectCount(CustomAllocationRosterSearchEntity searchCount);

    /**
     * 添加需要分配的客户
     *
     * @return
     */
    int taskAddAllocation(@Param("country") String country);

    /**
     * 自动回收分配出去的用户(一个月)
     *
     * @return
     */
    int taskUpdateAllocationRecovery();


    int taskUpdateAllocationRecoveryByCN();

    int taskUpdateAllocationReviseAgent();

    int clickAllocationRoster(CustomAllocationRosterClickEntity entity);

    List<CustomAllocationRosterTable> findClickAllocationRoster(CustomAllocationRosterClickEntity entity);

    int clickAllocationRosterByCountrys(CustomAllocationRosterClickByCountrysEntity entity);

    List<CustomAllocationRosterTable> findClickAllocationRosterByCountrys(CustomAllocationRosterClickByCountrysEntity entity);

}
