package com.crm.manager.dao.mapper;

import com.crm.rely.backend.core.pojo.table.CustomLoginTable;
import com.crm.rely.backend.core.pojo.view.AccountBalanceView;
import com.crm.rely.backend.core.pojo.view.CustomLoginView;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by max on 2020/6/17.
 */
@Repository
public interface CustomLoginDao {

    Long getAgentIdByLogin(Long login);

    Long getCustomIdByLogin(Long login);

    List<Long> getCustomIdsByLogins(List<Long> logins);

    void deleteInBatchByCustomId(List<Long> logins);

    List<CustomLoginTable> findAllLoginBySalesId(Long salesId);

    void batchUpdateLoginStatusByAgentId(List<CustomLoginTable> tables);

    CustomLoginTable getCustomLoginByLogin(Long login);

    List<CustomLoginView> getEmailCustomByLogin(@Param("tradeList")List<Long> tradeList,@Param("platform") String platform);

    AccountBalanceView getCustomLoginByLoginAndPlatform(@Param("login") Long login, @Param("platform") String platform);
}
