package com.yida.data.school.news.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yida.data.common.core.entity.school.EduSchoolManuscript;
import com.yida.data.common.core.entity.system.Dept;
import com.yida.data.common.core.entity.system.EduYidaApp;
import com.yida.data.school.vo.index.ManuscriptPageInfoVO;
import java.util.List;
import org.springframework.scheduling.annotation.Async;

/**
 * Service接口
 *
 * @author zhanghaijun
 * @date 2021-07-19 17:21:58
 */
public interface EduSchoolManuscriptService extends IService<EduSchoolManuscript> {

    IPage<ManuscriptPageInfoVO> listManuscriptPage(Page page, Long schoolId, String keyword, String author,
        String publishDate, Integer path,
        Long notShowId, Integer type, Integer status, Integer label);

    IPage<ManuscriptPageInfoVO> listpublicManuscriptPage(Page page, Long schoolId, Long notShowId, Integer type);

    @Async
    void saveManuscript(EduSchoolManuscript manuscript, String key);

    void delManuscript(List<Long> ids);

    void cancelManuscriptBatch(Long id);

    void publishManuscript(Long id);

    List<EduSchoolManuscript> listManuscript(Long schoolId, String name, Integer path, Integer type, Integer status);

    EduSchoolManuscript getInfo(Long id);

    /**
     * @param manuscript
     * @param school
     * @param yidaApp
     */
    void saveManuscriptToYidaApp(EduSchoolManuscript manuscript, Dept school, EduYidaApp yidaApp);

    IPage<EduSchoolManuscript> findManuscriptByLabel(Page<EduSchoolManuscript> page, String label);
}
