package ink.wgink.module.sms.service.email;

import ink.wgink.module.sms.pojo.dtos.email.EmailDTO;
import ink.wgink.module.sms.pojo.vos.email.EmailVO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;

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
     */
    void save(EmailVO emailVO);

    /**
     * 删除邮件
     *
     * @param ids
     * @return
     */
    void remove(List<String> ids);

    /**
     * 修改发送状态
     *
     * @param emailId
     * @param sendingStatus
     */
    void updateSendingStatus(String emailId, int sendingStatus);

    /**
     * 详情
     *
     * @param params
     * @return
     */
    EmailDTO get(Map<String, Object> params);

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

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

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

    /**
     * 发送邮件
     *
     * @param emailVO
     */
    void send(EmailVO emailVO);

    /**
     * 重新发送邮件
     *
     * @param emailId
     */
    void reSend(String emailId);

}
