package com.qmth.distributed.print.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.teachcloud.common.entity.BasicPrintConfig;

import java.util.List;

/**
 * <p>
 * 印品配置 服务类
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface BasicPrintConfigService extends IService<BasicPrintConfig> {
    IPage<BasicPrintConfig> listPage(Long examId, Boolean enable, Long createStartTime, Long createEndTime, Integer pageNumber, Integer pageSize);

    boolean enable(Long id, Boolean enable);

    boolean savePrintConfig(BasicPrintConfig basicPrintConfig);

    /**
     * 根据考试ID和课程代码获取印品
     *
     * @param examId 考试ID
     * @return BasicPrintConfig
     */
    BasicPrintConfig getByExamId(Long examId);

    List<BasicPrintConfig> listBySchoolId(Long schoolId);

    void removeByExamId(Long examId);

    void updateAttachmentIdByTemplateId(Long templateId, Long attachmentId);
}
