package com.crm.manager.service;

import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.system.email.config.SysEmailConfigSearchDto;
import com.crm.rely.backend.core.entity.system.config.SendUpdateEmailCodeEntity;
import com.crm.rely.backend.core.entity.system.email.config.*;
import com.crm.rely.backend.core.exception.ServiceException;

import java.util.List;

public interface SysEmailConfigService {
    /**
     * 添加配置
     *
     * @param entity
     * @throws ServiceException
     */
    void add(SysEmailConfigAddEntity entity) throws ServiceException;

    /**
     * 修改配置
     *
     * @param entity
     * @throws ServiceException
     */
    void update(SysEmailConfigUpdateEntity entity) throws ServiceException;

    void save(SysEmailConfigBatchUpdateEntity entity, List<SysEmailConfigBaseUpdateEntity> entitys) throws ServiceException;

    /**
     * 删除配置
     *
     * @param entity
     * @throws ServiceException
     */
    void delete(SysEmailConfigDeleteEntity entity) throws ServiceException;

    /**
     * 根据条件查询配置
     *
     * @param entity
     * @return
     * @throws ServiceException
     */
    ResultWithPagerDto<SysEmailConfigSearchDto> searchPageList(SysEmailConfigSearchEntity entity) throws ServiceException;

    List<SysEmailConfigSearchDto> searchList() throws ServiceException;

    /**
     * 根据条件 单个获取配置信息
     *
     * @param entity
     * @return
     * @throws ServiceException
     */
    SysEmailConfigSearchDto searchSingle(SysEmailConfigSingleEntity entity) throws ServiceException;

    void sendEmailCode(SendUpdateEmailCodeEntity entity) throws ServiceException;
}
