package com.luojia_channel.modules.interact.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.luojia_channel.modules.interact.entity.Follow;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface FollowMapper extends BaseMapper<Follow> {
    @Delete("delete from follow where user_id = #{userId} and follow_user_id = #{followUserId}")
    boolean delete(Long userId, Long followUserId);

    @Select("select count(*) from follow where user_id = #{userId} and follow_user_id = #{followUserId}")
    Integer queryCount(Long userId, Long followUserId);
}
