package com.simuwang.base.mapper;

import com.simuwang.base.pojo.dos.EmailTemplateInfoDO;
import com.simuwang.base.pojo.dos.EmailTemplateMappingDO;
import com.simuwang.base.pojo.dto.query.EmailTemplateSettingPageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EmailTemplateMappingMapper {

    List<EmailTemplateInfoDO> queryByEmail(@Param("email") String email, @Param("type") Integer type);

    List<EmailTemplateMappingDO> searchTemplateSettingList(EmailTemplateSettingPageQuery emailTemplateSettingPageQuery);

    long countTemplateSettingList(EmailTemplateSettingPageQuery emailTemplateSettingPageQuery);

    void deleteTemplateSetting(@Param("idList") List<Integer> idList, @Param("userId") Integer userId);

    void updateEmailTemplateMappingDO(EmailTemplateMappingDO emailTemplateMappingDO);

    void saveEmailTemplateMappingDO(EmailTemplateMappingDO emailTemplateMappingDO);

    EmailTemplateMappingDO searchTemplateById(@Param("id") Integer status);
}
