package com.cm.manager.sms.dao.email;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.manager.sms.pojo.dtos.email.EmailDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IEmailDao
 * @Description: 邮件
 * @Author: WangGeng
 * @Date: 2020/7/31 4:20 下午
 * @Version: 1.0
 **/
@Repository
public interface IEmailDao {
    /**
     * 保存Email
     *
     * @param params
     * @throws SaveException
     */
    void saveEmail(Map<String, Object> params) throws SaveException;

    /**
     * 删除Email
     *
     * @param params
     * @throws RemoveException
     */
    void removeEmail(Map<String, Object> params) throws RemoveException;

    /**
     * 更新邮件发送状态
     *
     * @param params
     * @throws UpdateException
     */
    void updateEmailSendingStatus(Map<String, Object> params) throws UpdateException;

    /**
     * Email详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    EmailDTO getEmail(Map<String, Object> params) throws SearchException;

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

}
