2025-02-24 10:18:11 +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.ruoyi.wgz.mapper.WgzMessageMapper">
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.wgz.domain.WgzMessage" id="WgzMessageResult">
|
|
|
|
<result property="id" column="id"/>
|
|
|
|
<result property="senderType" column="sender_type"/>
|
|
|
|
<result property="senderId" column="sender_id"/>
|
|
|
|
<result property="recipientType" column="recipient_type"/>
|
|
|
|
<result property="recipientId" column="recipient_id"/>
|
|
|
|
<result property="headline" column="headline"/>
|
|
|
|
<result property="subheading" column="subheading"/>
|
|
|
|
<result property="tableId" column="table_id"/>
|
|
|
|
<result property="tableName" column="table_name"/>
|
|
|
|
<result property="messageLargeType" column="message_large_type"/>
|
|
|
|
<result property="messageSmallType" column="message_small_type"/>
|
|
|
|
<result property="readStatus" column="read_status"/>
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
</resultMap>
|
|
|
|
|
2025-02-24 19:12:16 +08:00
|
|
|
<!-- 消息类型统计(先分组再统计) -->
|
|
|
|
<select id="userMessageTypeStatistics" resultType="java.util.Map">
|
|
|
|
SELECT
|
|
|
|
message_large_type,
|
|
|
|
count( 1 ) as ct
|
|
|
|
FROM
|
|
|
|
wgz_message
|
|
|
|
WHERE
|
|
|
|
recipient_id = #{id}
|
|
|
|
AND recipient_type = "1"
|
|
|
|
AND read_status = "0"
|
|
|
|
GROUP BY
|
|
|
|
message_large_type
|
|
|
|
</select>
|
2025-02-24 10:18:11 +08:00
|
|
|
|
2025-02-24 19:12:16 +08:00
|
|
|
</mapper>
|