2022-04-11 15:03:55 +08:00
|
|
|
<?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="io.renren.modules.notice.dao.SysNoticeDao">
|
|
|
|
|
|
|
|
<!-- 获取被通知的用户列表 -->
|
|
|
|
<select id="getNoticeUserList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
|
|
|
|
select t2.real_name as receiver_name, t1.read_status, t1.read_date from sys_notice_user t1, sys_user t2
|
|
|
|
where t1.receiver_id = t2.id and t1.notice_id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 获取我的通知列表 -->
|
|
|
|
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
|
2022-10-04 17:34:19 +08:00
|
|
|
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content ,t2.`from`, t2.apply_id, t2.apply_state from
|
2022-06-22 10:22:48 +08:00
|
|
|
sys_notice_user t1, sys_notice t2
|
2022-06-01 10:56:45 +08:00
|
|
|
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
|
|
|
|
<if test="readStatus != null">
|
|
|
|
AND read_status = #{readStatus}
|
|
|
|
</if>
|
2022-06-22 09:49:17 +08:00
|
|
|
<if test="from != null">
|
2022-06-22 09:57:38 +08:00
|
|
|
AND `from` = #{from}
|
2022-06-22 09:49:17 +08:00
|
|
|
</if>
|
2022-06-01 10:56:45 +08:00
|
|
|
order by t2.create_date desc
|
2022-04-11 15:03:55 +08:00
|
|
|
</select>
|
|
|
|
</mapper>
|