2020-01-03 19:28:10 +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="com.rymcu.vertical.mapper.NotificationMapper">
|
|
|
|
<resultMap id="BaseResultMapper" type="com.rymcu.vertical.entity.Notification">
|
|
|
|
<id column="id" property="idNotification"></id>
|
|
|
|
<result column="id_user" property="idUser"></result>
|
|
|
|
<result column="data_type" property="dataType"></result>
|
|
|
|
<result column="data_id" property="dataId"></result>
|
|
|
|
<result column="data_summary" property="dataSummary"></result>
|
|
|
|
<result column="has_read" property="hasRead"></result>
|
2020-01-23 00:39:43 +08:00
|
|
|
<result column="created_time" property="createdTime"></result>
|
2020-01-03 19:28:10 +08:00
|
|
|
</resultMap>
|
|
|
|
<select id="selectUnreadNotifications" resultMap="BaseResultMapper">
|
|
|
|
select * from vertical_notification where has_read = '0' and id_user = #{idUser}
|
|
|
|
</select>
|
|
|
|
<select id="selectNotifications" resultMap="BaseResultMapper">
|
|
|
|
select * from vertical_notification where id_user = #{idUser}
|
|
|
|
</select>
|
|
|
|
</mapper>
|