| | |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id, template_id, receiver_id, platform, msg_type, title, content, biz_id, biz_type, is_read, read_time, extra, create_by, create_time, update_by, update_time |
| | | id |
| | | , template_id, receiver_id, platform, msg_type, title, content, biz_id, biz_type, is_read, read_time, extra, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | <!-- 与 MesMsgRecordQueryPollDto 字段对应的 SQL 片段 --> |
| | | <sql id="Poll_Column_List"> |
| | | id, title, content |
| | | id |
| | | , title, content |
| | | </sql> |
| | | <!-- 与 MesMsgRecordQuerySystemDto 字段对应的 SQL 片段 --> |
| | | <sql id="System_Column_List"> |
| | | id, title, content |
| | | id |
| | | , title, content |
| | | </sql> |
| | | <update id="batchMarkRead"> |
| | | UPDATE mes_msg_record |
| | |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | <!-- 使用专门的 resultMap 进行映射 --> |
| | | <select id="PollMes" parameterType="java.lang.Long" resultMap="PollResultMap"> |
| | | <!-- 根据平台 查询未读消息 --> |
| | | <!-- 使用Map作为参数类型,支持多参数传递 --> |
| | | <select id="PollMes" parameterType="map" resultMap="PollResultMap"> |
| | | <!-- 根据平台和消息类型查询未读消息 --> |
| | | select |
| | | <include refid="Poll_Column_List"/> |
| | | from mes_msg_record |
| | |
| | | <if test="platform != null"> |
| | | platform = #{platform} |
| | | </if> |
| | | <if test="msgType != null"> |
| | | and msg_type = #{msgType} |
| | | </if> |
| | | and is_read = 0 |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="queryAllSysNotice" |
| | | resultMap="SystemResultMap"> |
| | | select |
| | |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="PollMesAll" parameterType="long" resultMap="PollResultMap"> |
| | | <!-- 根据平台和消息类型查询未读消息 --> |
| | | select |
| | | <include refid="Poll_Column_List"/> |
| | | from mes_msg_record |
| | | <where> |
| | | <if test="platform != null"> |
| | | platform = #{platform} |
| | | </if> |
| | | and is_read = 0 |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |