<?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.kxs.system.biz.mapper.KxsUserMsgMapper">

    <resultMap type="com.kxs.system.api.model.KxsUserMsg" id="KxsUserMsgMap">
        <result column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="del_flag" property="delFlag" />
        <result column="version" property="version" />
        <result column="title" property="title" />
        <result column="summary" property="summary" />
        <result column="msg_type" property="msgType" />
        <result column="start_time" property="startTime" />
        <result column="end_time" property="endTime" />
        <result column="bg_pic" property="bgPic" />
        <result column="push_type" property="pushType" />
        <result column="push_time" property="pushTime" />
        <result column="url" property="url" />
        <result column="content" property="content" />
        <result column="read_flag" property="readFlag" />

    </resultMap>
    <select id="getByPage" resultType="com.kxs.system.api.vo.kxsapp.userMsg.UserMsgPageVO">
        select id, title, summary, msg_type, push_time, url,bg_pic,read_flag from kxs_user_msg a
        <where>
            a.del_flag = '0'
            and user_id = #{userId}
        </where>
        order by a.create_time desc
    </select>

</mapper>
