SysUserMessageMapper.xml 1.3 KB
Newer Older
qinhu's avatar
1  
qinhu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<?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="cn.wise.sc.cement.business.mapper.SysUserMessageMapper">

    <!-- 未查看消息 -->
    <select id="getNoCheck" resultType="cn.wise.sc.cement.business.entity.SysUserMessage">
        select *
        FROM sys_user_message rum
        where rum.is_check=0
        <if test="userId != null and userId !=''">
            and rum.user_id = #{userId}
        </if>
        <if test="appId != null and appId !=''">
            and rum.app_id = #{appId}
        </if>
        <if test="messageType != null and messageType !=''">
            and rum.message_type = #{messageType}
        </if>
    </select>


    <!-- 未处理消息记录 -->
    <select id="getNoDeal" resultType="cn.wise.sc.cement.business.entity.SysUserMessage">
        select *
        FROM sys_user_message rum
        where rum.is_deal=0
        <if test="userId != null and userId !=''">
            and rum.user_id = #{userId}
        </if>
        <if test="appId != null and appId !=''">
            and rum.app_id = #{appId}
        </if>
        <if test="messageType != null and messageType !=''">
            and rum.message_type = #{messageType}
        </if>
    </select>

</mapper>