Crunchy
2024-04-23 0a49707dd4dbacf83935b8b00af27cdf29c02b10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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.yuanchu.mom.mapper.InformationNotificationMapper">
 
    <select id="getPage" resultType="com.yuanchu.mom.pojo.InformationNotificationDto">
        select i.*, u.name senderUser, u2.name consigneeUserr
        from information_notification i
                 left join user u on i.sender_id = u.id
                 left join user u2 on u2.id = i.consignee_id
        <if test="messageType != '' and messageType != null">
            where i.message_type = #{messageType}
        </if>
    </select>
</mapper>