| | |
| | | </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 |
| | | <where> |
| | | <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 |
| | | <include refid="System_Column_List"/> |
| | | from mes_msg_record |
| | | <where> |
| | | # 系统1 |
| | | msg_type = 1 |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | <select id="queryorder" resultType="com.oying.modules.message.domain.myDto.MesMsgRecordQueryOrderDto" |
| | | parameterType="java.lang.Long"> |
| | | # 根据店铺号 给出订单号与订单消息 |
| | | select id,content,order_no |
| | | from mes_msg_record |
| | | <where> |
| | | <if test="shopId != null"> |
| | | shop_id = #{shopId} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | <select id="PollMesAll" parameterType="long" resultMap="PollResultMap"> |
| | | <!-- 根据平台和消息类型查询未读消息 --> |
| | | select |
| | | <include refid="Poll_Column_List"/> |
| | | from mes_msg_record |
| | |
| | | and is_read = 0 |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | <select id="queryAllSysNotice" |
| | | resultMap="SystemResultMap"> |
| | | select |
| | | <include refid="System_Column_List"/> |
| | | from mes_msg_record |
| | | <where> |
| | | # 系统1 |
| | | msg_type = 1 |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | <select id="queryorder" resultType="com.oying.modules.message.domain.myDto.MesMsgRecordQueryOrderDto" |
| | | parameterType="java.lang.Long"> |
| | | # 根据店铺号 给出订单号与订单消息 |
| | | select id,content,order_no |
| | | from mes_msg_record |
| | | <where> |
| | | <if test="shopId != null"> |
| | | shop_id = #{shopId} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | </mapper> |