package cn.com.tenlion.buildingpictures.service.picturestemplate;

import cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplate.PicturesTemplateBuildingDTO;
import cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplate.PicturesTemplateDTO;
import cn.com.tenlion.buildingpictures.pojo.vos.picturestemplate.PicturesTemplateContentVO;
import cn.com.tenlion.buildingpictures.pojo.vos.picturestemplate.PicturesTemplateVO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: IPicturesTemplateService
 * @Description: 图片套版的模板管理
 * @Author: WenG
 * @Date: 2020-10-20 10:49
 * @Version: 1.0
 **/
public interface IPicturesTemplateService {

    /**
     * 新增图片套版的模板管理
     *
     * @param picturesTemplateVO
     * @return
     * @throws Exception
     */
    SuccessResult savePicturesTemplate(PicturesTemplateVO picturesTemplateVO) throws Exception;

    /**
     * 新增图片套版的模板管理(APP)
     *
     * @param token
     * @param picturesTemplateVO
     * @return
     * @throws Exception
     */
    SuccessResult savePicturesTemplateByToken(String token, PicturesTemplateVO picturesTemplateVO) throws Exception;

    /**
     * 新增图片套版的模板管理
     *
     * @param picturesTemplateVO
     * @return picturesTemplateId
     * @throws Exception
     */
    String savePicturesTemplateReturnId(PicturesTemplateVO picturesTemplateVO) throws Exception;

    /**
     * 新增图片套版的模板管理(APP)
     *
     * @param token
     * @param picturesTemplateVO
     * @return picturesTemplateId
     * @throws Exception
     */
    String savePicturesTemplateByTokenReturnId(String token, PicturesTemplateVO picturesTemplateVO) throws Exception;

    /**
     * 删除图片套版的模板管理
     *
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removePicturesTemplate(String ids) throws RemoveException;

    /**
     * 删除图片套版的模板管理（物理删除）
     *
     * @param ids
     * @throws RemoveException
     */
    void deletePicturesTemplate(String ids) throws RemoveException;

    /**
     * 删除图片套版的模板管理(APP)
     *
     * @param token
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removePicturesTemplateByToken(String token, String ids) throws RemoveException;

    /**
     * 修改图片套版的模板管理
     *
     * @param picturesTemplateId
     * @param picturesTemplateVO
     * @return
     * @throws Exception
     */
    SuccessResult updatePicturesTemplate(String picturesTemplateId, PicturesTemplateVO picturesTemplateVO) throws Exception;

    /**
     * 修改图片套版的模板管理(APP)
     *
     * @param token
     * @param picturesTemplateId
     * @param picturesTemplateVO
     * @return
     * @throws Exception
     */
    SuccessResult updatePicturesTemplateByToken(String token, String picturesTemplateId, PicturesTemplateVO picturesTemplateVO) throws Exception;

    /**
     * 图片套版的模板管理详情(通过ID)
     *
     * @param picturesTemplateId
     * @return
     * @throws SearchException
     */
    PicturesTemplateDTO getPicturesTemplateById(String picturesTemplateId) throws SearchException;

    /**
     * 图片套版的模板管理列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<PicturesTemplateDTO> listPicturesTemplate(Map<String, Object> params) throws SearchException;

    /**
     * 图片套版的模板管理分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<PicturesTemplateDTO>> listPagePicturesTemplate(ListPage page) throws SearchException;

    /**
     * 图片套版的模板管理统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer countNumberPicturesTemplate(Map<String, Object> params) throws SearchException;

    /**
     * 图片套版的模板管理统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    SuccessResultData<Integer> countPicturesTemplate(Map<String, Object> params) throws SearchException;

    SuccessResult buiderPicturesTemplateByPicturesTemplateCode(String picturesTemplateCode) throws Exception;

    SuccessResult updatePicturesTemplatePublishStatus(String picturesTemplateId, Boolean picturesTemplatePublishStatus) throws Exception;

    SuccessResult buiderPicturesTemplateAll() throws Exception;

    SuccessResult updatePicturesTemplateContent(String picturesTemplateId, PicturesTemplateContentVO picturesTemplateContentVO) throws Exception;

    SuccessResult copyPicturesTemplate(String id, String picturesTemplateCode, String picturesTemplateTitle) throws Exception;

    PicturesTemplateDTO getPicturesTemplateByCode(String picturesTemplateCode) throws Exception;

    SuccessResultData  buiderPicturesTemplate(String picturesTemplateCode) throws Exception;

    /**
     * 供其他模块调用时候单独使用, 本模块内还是使用旧的listPicturesTemplate
     * @param queryParams
     * @return
     * @throws Exception
     */
    List<PicturesTemplateBuildingDTO> list(Map<String, Object> queryParams) throws SearchException;

    /**
     * 供其他模块调用时候单独使用, 本模块内还是使用旧的getPicturesTemplate
     * @param queryParams
     * @return
     * @throws Exception
     */
    PicturesTemplateBuildingDTO get(Map<String, Object> queryParams) throws SearchException;
}