123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?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.dragon.tj.portal.mapper.NoticeInfoMapper">
- <select id="queryPage" resultType="com.dragon.tj.portal.entity.NoticeInfo">
- SELECT b.id,member_id,scope_type,scope_id,message_type,read_status,title,content,attachment_path,a.id as target_id,b.message_level, b.create_user, b.create_time,a.read_status,
- b.create_org_name
- from notice_info_scope a
- LEFT JOIN notice_info b on a.notice_info_id = b.id
- where b.del_flag = 0
- <if test="req.messageType != null">
- and b.message_type = #{req.messageType}
- </if>
- <if test="req.title != null and req.title != ''">
- and b.title = #{req.title}
- </if>
- <if test="idCard != null and idCard != ''">
- and a.member_id = #{idCard}
- </if>
- <if test="req.content != null and req.content != ''">
- and b.content = #{req.content}
- </if>
- <if test="req.deptCode != null and req.deptCode != ''">
- and a.scope_id = #{req.deptCode}
- </if>
- <if test="req.readStatus != null">
- and a.read_status = #{req.readStatus}
- </if>
- <if test="req.publishTimeStart != null and req.publishTimeEnd != null ">
- and b.create_time >= #{req.publishTimeStart} and b.create_time <= #{req.publishTimeEnd}
- </if>
- order by b.create_time desc
- </select>
- <select id="getCount" resultType="java.lang.Integer">
- SELECT COUNT(1) from notice_info_scope a
- LEFT JOIN notice_info b on a.notice_info_id = b.id
- where b.del_flag = 0
- and a.read_status = #{readStatus}
- and a.member_id = #{idCard}
- </select>
- </mapper>
|