You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.3 KiB
48 lines
1.3 KiB
<?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.epmet.dao.IcMessageDao">
|
|
|
|
<select id="selectMessageList" resultType="com.epmet.dto.IcMessageDTO">
|
|
SELECT
|
|
id,
|
|
customer_id,
|
|
grid_id,
|
|
user_id,
|
|
app,
|
|
message_type,
|
|
target_id,
|
|
title,
|
|
message_content,
|
|
read_flag
|
|
FROM
|
|
ic_message
|
|
WHERE
|
|
del_flag = '0'
|
|
AND customer_id = #{customerId}
|
|
AND user_id = #{userId}
|
|
</select>
|
|
|
|
<update id="upByUserId" parameterType="com.epmet.dto.form.ReadIcMessageFormDTO">
|
|
UPDATE ic_message
|
|
SET read_flag = 'read',
|
|
updated_by = #{userId},
|
|
updated_time = NOW()
|
|
WHERE
|
|
del_flag = '0'
|
|
AND customer_id = #{customerId}
|
|
AND user_id = #{userId}
|
|
</update>
|
|
|
|
<select id="selectUnReadCount" resultType="java.lang.Integer">
|
|
SELECT
|
|
COUNT(id)
|
|
FROM
|
|
ic_message
|
|
WHERE
|
|
del_flag = '0'
|
|
AND read_flag = 'unread'
|
|
AND user_id = #{userId}
|
|
</select>
|
|
|
|
</mapper>
|