package com.pcloud.book.applet.dao;


import com.pcloud.book.applet.dto.AnswerSubscribeCountDto;
import com.pcloud.book.applet.entity.AnswerSubscribe;
import com.pcloud.common.core.dao.BaseDao;

import java.util.List;

/**
 * 答案订阅(AnswerSubscribe)表数据库访问层
 *
 * @author makejava
 * @since 2020-09-16 15:55:30
 */
public interface AnswerSubscribeDao extends BaseDao<AnswerSubscribe>{


    /**
     * 更新发送状态
     * @author：zhuyajie
     * @date：2020/9/16 16:21
     *  * @param null
     */
    void updateSendState(AnswerSubscribe answerSubscribe);

    /**
     * 查询订阅记录
     * @author：zhuyajie
     * @date：2020/9/16 16:35
     *  * @param null
     */
    List<AnswerSubscribe> getRecordByUserBook(AnswerSubscribe answerSubscribe);

    /**
     * 根据发送状态查记录
     * @author：zhuyajie
     * @date：2020/9/18 10:04
     *  * @param null
     */
    List<AnswerSubscribe> getBySendStateAndBook(AnswerSubscribe answerSubscribe);

    /**
     * 根据发送状态查书刊（去重）
     * @author：zhuyajie
     * @date：2020/9/18 10:08
     *  * @param null
     */
    List<AnswerSubscribe> getBookBySendState(Integer sendState);
    /**
     * 查编辑订阅人数
     * @author：zhuyajie
     * @date：2020/12/1 19:21
     *  * @param null
     */
    List<AnswerSubscribeCountDto> getSubscribeCount4Adviser(Integer limit);
    /**
     * 查订阅人数
     * @author：zhuyajie
     * @date：2020/12/1 19:54
     *  * @param null
     */
    Integer getUserCountByBookAdviser(AnswerSubscribe answerSubscribe);
}