This commit is contained in:
jiangh277
2025-12-24 14:17:19 +08:00
parent 3eb445291f
commit 4c7d59f87b
89 changed files with 3525 additions and 311 deletions

View File

@@ -0,0 +1,31 @@
<?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.timeline.user.dao.FriendNotifyMapper">
<insert id="insert" parameterType="com.timeline.user.entity.FriendNotify">
INSERT INTO friend_notify (from_user_id, to_user_id, type, status, content, create_time)
VALUES (#{fromUserId}, #{toUserId}, #{type}, #{status}, #{content}, #{createTime})
</insert>
<select id="selectUnread" resultType="com.timeline.user.entity.FriendNotify">
SELECT * FROM friend_notify
WHERE to_user_id = #{toUserId} AND status = 'unread'
ORDER BY create_time DESC
</select>
<select id="selectAllByUser" resultType="com.timeline.user.entity.FriendNotify">
SELECT * FROM friend_notify
WHERE to_user_id = #{toUserId}
ORDER BY create_time DESC
</select>
<update id="markRead">
UPDATE friend_notify
SET status = 'read', read_time = NOW()
WHERE id = #{id}
</update>
</mapper>