<?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.fjhx.mail.mapper.message.MessageAttachmentMapper">
    <select id="getList" resultType="com.fjhx.mail.entity.message.po.MessageAttachment">
        SELECT
        ma.id,
        ma.message_id,
        ma.`name`,
        ma.url
        FROM
        <if test="type eq 1">
            personal_message_attachment ma
        </if>
        <if test="type eq 2">
            enterprise_message_attachment ma
        </if>
        ${ew.customSqlSegment}
    </select>
</mapper>
