package com.ruoyi.frequency.follow.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.page.PageResult;
import com.ruoyi.controller.req.FollowUserReq;
import com.ruoyi.controller.req.FollowerPageByOther;
import com.ruoyi.controller.resp.FollowPageResp;
import com.ruoyi.frequency.follow.entity.Follow;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.UserVo;

import java.util.List;

/**
 * 关注Service接口
 * 
 * @author liwenlong
 * @date 2023-07-22
 */
public interface FollowService extends IService<Follow>
{
    /**
     * 查询关注
     * 
     * @param id 关注主键
     * @return 关注
     */
    public Follow selectFollowById(Long id);

    /**
     * 查询关注列表
     * 
     * @param follow 关注
     * @return 关注集合
     */
    public List<Follow> selectFollowList(Follow follow);

    /**
     * 新增关注
     * 
     * @param follow 关注
     * @return 结果
     */
    public int insertFollow(Follow follow);

    /**
     * 修改关注
     * 
     * @param follow 关注
     * @return 结果
     */
    public int updateFollow(Follow follow);

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

    /**
     * 删除关注信息
     * 
     * @param id 关注主键
     * @return 结果
     */
    public int deleteFollowById(Long id);

    /**
     * 关注用户
     * @param req
     * @param userVo
     * @return
     */
    ResponseData followUser(FollowUserReq req, UserVo userVo);

    /**
     * 关注列表(自己看)
     * @param req
     * @param userVo
     * @return
     */
    ResponseData followerPageBySelf(FollowerPageByOther req, UserVo userVo);

    /**
     * 关注列表(别人看)
     * @param req
     * @param userVo
     * @return
     */
    ResponseData followerPageByOther(FollowerPageByOther req, UserVo userVo);

    /**
     * 粉丝列表(自己看)
     * @param req
     * @param userVo
     * @return
     */
    ResponseData fansPageBySelf(FollowerPageByOther req, UserVo userVo);

    /**
     * 粉丝列表(别人看)
     * @param req
     * @param userVo
     * @return
     */
    ResponseData fansPageByOther(FollowerPageByOther req, UserVo userVo);

    /**
     * 查询未关注列表
     * @param req
     * @param userVo
     * @return
     */
    ResponseData<PageResult<FollowPageResp>> notFollowerPageBySelf(FollowerPageByOther req, UserVo userVo);
}
