package com.crm.email.service;


import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.system.email.record.SysEmailRecordSearchDto;
import com.crm.rely.backend.core.entity.system.email.SupplementSendEmailEntity;
import com.crm.rely.backend.core.entity.system.email.SysEmailSendEntity;
import com.crm.rely.backend.core.entity.system.email.SysEmailTestSendEntity;
import com.crm.rely.backend.core.entity.system.email.record.SysEmailRecordSearchEntity;
import org.springframework.scheduling.annotation.Async;

public interface SysEmailRecordService {

    @Async("emailTaskExecutor")
    BaseResultDto send(SysEmailSendEntity entity) throws Exception;

    @Async("emailTaskExecutor")
    BaseResultDto send(SysEmailTestSendEntity entity) throws Exception;

    @Async("emailTaskExecutor")
    BaseResultDto send(SupplementSendEmailEntity entity) throws Exception;

    @Async("emailTaskExecutor")
    BaseResultDto send(Long id) throws Exception;


    ResultWithPagerDto<SysEmailRecordSearchDto> searchList(SysEmailRecordSearchEntity entity) throws Exception;
}
