医院废弃物信息化管理平台
“mitao”
2025-12-24 3763145f34d7706923d55edc32f5cfbc8bc08b92
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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="cn.besteam.modules.medical.mapper.MwMessageMapper">
 
 
    <select id="queryPageList" resultType="cn.besteam.modules.medical.vo.MwMessageVo">
        SELECT
            m.id,
            m.title,
            m.promulgator,
            m.content,
            m.`status`,
            m.create_time AS createTime
        FROM
            mw_message m
        <where>
            <if test="userId!=null">
                and (FIND_IN_SET(#{userId},m.user_id) or user_id is null or user_id = '')
            </if>
            <if test="dto.startTime !=null">
                <![CDATA[
                  and date_format( m.create_time, '%Y-%m-%d %H:%i:%s' ) >= date_format( #{dto.startTime} , '%Y-%m-%d %H:%i:%s' )
                ]]>
            </if>
            <if test="dto.endTime !=null">
                <![CDATA[
                  and date_format( m.create_time, '%Y-%m-%d %H:%i:%s' ) <= date_format( #{dto.endTime}   , '%Y-%m-%d %H:%i:%s' )
                ]]>
            </if>
            <if test="dto.content !=null and dto.content !='' ">
                and m.content like concat('%' , #{dto.content} , '%')
            </if>
            <if test="dto.promulgator !=null and dto.promulgator !='' ">
                and m.promulgator like concat('%' , #{dto.promulgator} , '%')
            </if>
            <if test="dto.status != null">
                and m.status = #{dto.status}
            </if>
        </where>
        order by m.create_time desc
    </select>
</mapper>