package com.cm.manager.sms.service;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SearchException;
import com.cm.common.pojo.ListPage;
import com.cm.common.result.SuccessResult;
import com.cm.common.result.SuccessResultList;
import com.cm.manager.sms.pojo.dtos.email.EmailDTO;
import com.cm.manager.sms.pojo.dtos.sms.SmsDTO;
import com.cm.manager.sms.pojo.vos.email.EmailVO;
import com.cm.manager.sms.pojo.vos.sms.SmsVO;

import javax.validation.constraints.Email;
import java.util.List;
import java.util.Map;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IEmailService
 * @Description: 邮件服务
 * @Author: WangGeng
 * @Date: 2020/7/31 4:19 下午
 * @Version: 1.0
 **/
public interface IEmailService {

    /**
     * 保存并发送系统邮件
     *
     * @param emailVO
     * @return
     * @throws Exception
     */
    SuccessResult saveAndSendSystemEmail(EmailVO emailVO) throws Exception;

    /**
     * 删除邮件
     *
     * @param ids
     * @return
     * @throws RemoveException
     */
    SuccessResult removeEmail(String ids) throws RemoveException;

    /**
     * 更新重新发送系统邮件
     *
     * @param emailId
     * @return
     * @throws Exception
     */
    SuccessResult updateReSendSystemEmailByEmailId(String emailId) throws Exception;

    /**
     * 邮件详情(通过ID)
     *
     * @param emailId
     * @return
     * @throws SearchException
     */
    EmailDTO getEmailById(String emailId) throws SearchException;

    /**
     * 邮件列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<EmailDTO> listEmail(Map<String, Object> params) throws SearchException;

    /**
     * 邮件分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<EmailDTO>> listPageEmail(ListPage page) throws SearchException;

}
