|
@@ -6,12 +6,18 @@
|
|
|
SELECT s.*,r.viewed,r.send_status,r.send_failure,r.send_time FROM sys_message s
|
|
|
JOIN sys_message_receiver r ON r.message_id = s.id AND r.user_id = #{userId}
|
|
|
<where>
|
|
|
- <if test="m.title != null">
|
|
|
+ <if test="m.title != null and m.title != ''">
|
|
|
AND s.title LIKE CONCAT('%',#{m.title},'%')
|
|
|
</if>
|
|
|
+ <if test="m.createBy != null and m.createBy != ''">
|
|
|
+ AND s.create_by LIKE CONCAT('%',#{m.createBy},'%')
|
|
|
+ </if>
|
|
|
<if test="m.category != null">
|
|
|
AND s.category = #{m.category}
|
|
|
</if>
|
|
|
+ <if test="m.viewed != null">
|
|
|
+ AND r.viewed = #{m.viewed}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
ORDER BY s.create_time DESC
|
|
|
</select>
|