package com.pcloud.book.es.biz;

import com.pcloud.book.es.entity.ESBookAndAdviser;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @Author ruansiyuan
 * @Date 2020/4/13 12:21
 **/
public interface ESBookAndAdviserBiz {
    void addAllBookAndAdviserToES();

    void updateBookAndAdviserToES(List<Long> bookIds);

    Page<ESBookAndAdviser> getAdviserBooks4ES(String grayStatus, String keyword, Long templetId, Long secondTempletId, Long thirdTempletId, Integer currentPage, Integer numPerPage);

    Page<ESBookAndAdviser> getESAdviserBooks4Applet(String grayStatus, String keyword, List<Long> templetIds, List<Long> graLabelIds, List<Long> subLabelIds, Integer currentPage, Integer numPerPage, List<Long> scecondTempletIds, Integer isAdviserBook, List<Long> adviserIds, Long agentId);

    Page<ESBookAndAdviser> getESAdviserBooks4AppletV2(String grayStatus, String keyword, List<Long> templetIds, List<Long> graLabelIds, List<Long> subLabelIds, Integer currentPage, Integer numPerPage, List<Long> scecondTempletIds, List<Long> adviserIds, Long agentId);

    void deleteAdviserBooks4ES();

    void deleteChoosedAdviserBooks4ES(String keyword);

    /**
     * 答案，搜索全平台书刊
     * @author：zhuyajie
     * @date：2020/11/4 13:52
     *  * @param null
     */
    Page<ESBookAndAdviser> getESAdviserBooks4Answer(String grayStatus, String keyword, Long graLabelId, Long subLabelId, Long verLabelId,
                                                    Integer currentPage, Integer numPerPage, List<Long> templetIds);
    /**
     * 系列书搜索
     * @author：zhuyajie
     * @date：2020/11/23 17:26
     *  * @param null
     */
    Page<ESBookAndAdviser> getAdviserBooks4SeriesBook(List<String> keywords, Integer currentPage, Integer numPerPage, List<Long> adviserIds, Long agentId, Long subLabelId, Long graLabelId, String serialNumber, Long verLabelId, Long volLabelId);

    Map<String, Object> getNotFoundBookId(String lastBookId)throws Exception;

    void stopNotFoundBookId();

    void updateTempletId();
}
