1234567891011121314151617 |
- <?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.personal.PersonalMessageMapper">
- <select id="getPage" resultType="com.fjhx.mail.entity.my.vo.MessageVo">
- SELECT pm.*,
- pmc.content,
- pmc.mime_type,
- cu.customer_id
- FROM personal_message pm
- LEFT JOIN personal_message_content pmc ON pmc.message_id = pm.id
- LEFT JOIN bytesailing_customer.customer_user cu
- ON (pm.from_email = cu.email OR FIND_IN_SET(cu.email, pm.recipients)) and cu.del_flag = 0 and
- cu.tenant_id = #{tenantId}
- LEFT JOIN bytesailing_customer.customer c ON cu.customer_id = c.id and c.del_flag = 0
- ${ew.customSqlSegment}
- </select>
- </mapper>
|