| | |
| | | <?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="org.jeecg.modules.system.mapper.SysAnnouncementSendMapper"> |
| | | |
| | | |
| | | <resultMap id="AnnouncementSendModel" type="org.jeecg.modules.system.model.AnnouncementSendModel" > |
| | | <result column="id" property="id" jdbcType="VARCHAR"/> |
| | | <result column="annt_id" property="anntId" jdbcType="VARCHAR"/> |
| | |
| | | <result column="open_type" property="openType" jdbcType="VARCHAR"/> |
| | | <result column="open_page" property="openPage" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="queryByUserId" parameterType="String" resultType="String"> |
| | | select sas.annt_id from sys_announcement_send sas |
| | | select sas.annt_id from sys_announcement_send sas |
| | | where sas.user_id = #{userId} |
| | | </select> |
| | | |
| | | |
| | | <select id="getMyAnnouncementSendList" parameterType="Object" resultMap="AnnouncementSendModel"> |
| | | select |
| | | sas.id, |
| | |
| | | <!-- 修改为已读消息 --> |
| | | <update id="updateReaded"> |
| | | update sys_announcement_send set read_flag = '1' |
| | | where user_id = #{userId} |
| | | where user_id = #{userId} |
| | | and annt_id in |
| | | <foreach collection="annoceIdList" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <select id="getPrimaryInfo" resultType="org.jeecg.modules.system.entity.SysAnnouncementSend"> |
| | | select |
| | | t1.id id, |
| | | t1.annt_id anntId, |
| | | t1.user_id userId, |
| | | t1.read_flag readFlag, |
| | | t2.msg_content msgContent, |
| | | t2.msg_category msgCategory |
| | | from |
| | | sys_announcement_send t1 |
| | | left join sys_announcement t2 |
| | | on t1.annt_id = t2.id |
| | | where t1.read_flag = '0' |
| | | and t1.user_id = #{userId} |
| | | <if test="msgCategoryList.size != 0"> |
| | | and t2.msg_category in ( |
| | | <foreach item="msgCategory" collection="msgCategoryList" separator=","> |
| | | #{msgCategory} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |