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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yida.data.common.core.entity.school.EduSchoolManuscript;
import com.yida.data.school.vo.index.ManuscriptPageInfoVO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * Mapper
 *
 * @author zhanghaijun
 * @date 2021-07-19 17:21:58
 */
public interface EduSchoolManuscriptMapper extends BaseMapper<EduSchoolManuscript> {

    /**
     * 分页查询稿件
     *
     * @param page
     * @param keyword
     * @param author
     * @param publishDate
     * @return
     */
    IPage<ManuscriptPageInfoVO> listManuscriptPage(Page page,
        @Param("schoolId") Long schoolId,
        @Param("keywprd") String keyword,
        @Param("author") String author,
        @Param("publishDate") String publishDate,
        @Param("path") Integer path,
        @Param("notShowId") Long notShowId,
        @Param("type") Integer type,
        @Param("status") Integer status,
        @Param("label") Integer label);

    IPage<ManuscriptPageInfoVO> listPublicManuscriptPage(Page page,
        @Param("schoolId") Long schoolId,
        @Param("notShowId") Long notShowId,
        @Param("type") Integer type);

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

    EduSchoolManuscript getInfo(@Param("id") Long id);

    /**
     * 查询稿件信息（包括已删除）
     *
     * @param id
     * @return
     */
    EduSchoolManuscript getInfoIncludeDel(@Param("id") Long id);
}
