package com.sonic.lion.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sonic.lion.domain.entity.ChannelBlacklist;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface ChannelBlacklistDao extends BaseMapper<ChannelBlacklist> {

    @Select("select count(1) from channel_blacklist where user_id =#{payerId} and channel_type = #{channelType} and is_delete = 0")
    int exitsPayerId(@Param("payerId") Long payerId, @Param("channelType") String channelType);


    @Select("select * from channel_blacklist where user_id =#{payerId} and channel_type = #{channelType} limit 1")
    ChannelBlacklist getPayerId(@Param("payerId") Long payerId, @Param("channelType") String channelType);

}
