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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.distributed.print.business.bean.result.TemplatePrintInfoResult;
import com.qmth.distributed.print.business.entity.BasicTemplate;

import java.util.List;

/**
 * <p>
 * 通用模板 服务类
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface BasicTemplateService extends IService<BasicTemplate> {

    IPage<BasicTemplate> list(Boolean enable, String name, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);

    boolean saveTemplate(String data) throws Exception;

    boolean enable(BasicTemplate template);

    BasicTemplate getOne(Long id);

    /**
     * 查找模版(机构同级及以下)
     *
     * @param ids
     * @return
     */
    List<TemplatePrintInfoResult> findTemplateInfoByOrgIds(List<Long> ids);

    String preview(Long id);

    boolean remove(Long id);
}
