<?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>
|