You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
2.3 KiB
45 lines
2.3 KiB
<?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.zdxt.message.mapper.MessageInfoMapper">
|
|
|
|
<resultMap type="MessageInfo" id="MessageInfoResult">
|
|
<result property="id" column="id" />
|
|
<result property="title" column="title" />
|
|
<result property="content" column="content" />
|
|
<result property="typecode" column="typeCode" />
|
|
<result property="sysid" column="sysId" />
|
|
<result property="sysname" column="sysName" />
|
|
<result property="userid" column="userId" />
|
|
<result property="mestype" column="mesType" />
|
|
<result property="templateparam" column="templateParam" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="status" column="status" />
|
|
</resultMap>
|
|
|
|
<sql id="selectMessageInfoVo">
|
|
select id, title, content, typeCode, sysId, sysName, userId, mesType, templateParam,create_time,status from message_info
|
|
</sql>
|
|
|
|
<select id="selectMessageInfoList" parameterType="MessageInfo" resultMap="MessageInfoResult">
|
|
<include refid="selectMessageInfoVo"/>
|
|
<where>
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
|
<if test="typecode != null and typecode != ''"> and typeCode = #{typecode}</if>
|
|
<if test="sysid != null and sysid != ''"> and sysId = #{sysid}</if>
|
|
<if test="sysname != null and sysname != ''"> and sysName like concat('%', #{sysname}, '%')</if>
|
|
<if test="userid != null and userid != ''"> and userId = #{userid}</if>
|
|
<if test="mestype != null and mestype != ''"> and mesType = #{mestype}</if>
|
|
<if test="templateparam != null and templateparam != ''"> and templateParam = #{templateparam}</if>
|
|
<if test="id != null and id != ''"> and id = #{id}</if>
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="selectMessageInfoById" parameterType="String" resultMap="MessageInfoResult">
|
|
<include refid="selectMessageInfoVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
</mapper>
|