<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.storlead.mail.mapper.MailAttachmentMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.storlead.mail.pojo.entity.MailAttachmentEntity" extends="com.storlead.framework.mybatis.mapper.SysBaseFieldMapper.BaseResultMap">
            <id column="id" property="id" />
            <result column="email_id" property="emailId" />
            <result column="file_code" property="fileCode" />
            <result column="file_name" property="fileName" />
            <result column="file_path" property="filePath" />
            <result column="file_size" property="fileSize" />
            <result column="download" property="download" />
            <result column="smtp_pop_id" property="smtpPopId" />
            <result column="file_ext" property="fileExt" />
        </resultMap>

        <!-- 通用查询结果列 -->
        <sql id="Base_Column_List">
                create_by,
                create_time,
                owner_by,
                update_by,
                enabled,
                sort,
                update_time,
                is_delete,
            id, email_id,smtp_pop_id,download,file_code, file_name, file_path, file_size, file_ext
        </sql>

    <select id="pageList"  resultType="com.storlead.mail.pojo.entity.MailAttachmentEntity">
        select att.*,e.sent_date from mail_attachment as att left join emails as e on att.email_id = e.id
         ${ew.customSqlSegment}
    </select>


</mapper>
