package com.cm.common.service.templaterecord;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SearchException;
import com.cm.common.pojo.ListPage;
import com.cm.common.pojo.dtos.templaterecord.TemplateRecordDTO;
import com.cm.common.pojo.vos.templaterecord.TemplateRecordVO;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultList;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: ITemplateRecordService
 * @Description: 模板构建记录
 * @Author: WenG
 * @Date: 2020-05-07 16:50
 * @Version: 1.0
 **/
public interface ITemplateRecordService {

    /**
     * 新增模板构建记录
     *
     * @param templateRecordVO
     * @return
     * @throws Exception
     */
    SuccessResult saveTemplateRecord(TemplateRecordVO templateRecordVO) throws Exception;

    /**
     * 新增模板构建记录(APP)
     *
     * @param token
     * @param templateRecordVO
     * @return
     * @throws Exception
     */
    SuccessResult saveTemplateRecordByToken(String token, TemplateRecordVO templateRecordVO) throws Exception;

    /**
     * 删除模板构建记录
     *
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeTemplateRecord(String ids) throws RemoveException;

    /**
     * 删除模板构建记录(APP)
     *
     * @param token
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeTemplateRecordByToken(String token, String ids) throws RemoveException;

    /**
     * 修改模板构建记录
     *
     * @param templateRecordId
     * @param templateRecordVO
     * @return
     * @throws Exception
     */
    SuccessResult updateTemplateRecord(String templateRecordId, TemplateRecordVO templateRecordVO) throws Exception;

    /**
     * 修改模板构建记录(APP)
     *
     * @param token
     * @param templateRecordId
     * @param templateRecordVO
     * @return
     * @throws Exception
     */
    SuccessResult updateTemplateRecordByToken(String token, String templateRecordId, TemplateRecordVO templateRecordVO) throws Exception;

    /**
     * 模板构建记录详情(通过ID)
     *
     * @param templateRecordId
     * @return
     * @throws SearchException
     */
    TemplateRecordDTO getTemplateRecordById(String templateRecordId) throws SearchException;

    /**
     * 模板构建记录列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<TemplateRecordDTO> listTemplateRecord(Map<String, Object> params) throws SearchException;

    /**
     * 模板构建记录分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<TemplateRecordDTO>> listPageTemplateRecord(ListPage page) throws SearchException;

    List<TemplateRecordDTO> getTemplateRecordByTemplateId(String templateId) throws SearchException;

}
