123456789101112131415161718192021222324 |
- <?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.yc.education.mapper.MessageMapper" >
- <resultMap id="BaseResultMap" type="com.yc.education.model.Message" >
- <!--
- WARNING - @mbggenerated
- -->
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="name" property="name" jdbcType="VARCHAR" />
- <result column="email" property="email" jdbcType="VARCHAR" />
- <result column="details" property="details" jdbcType="VARCHAR" />
- <result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
- </resultMap>
- <!-- 后台留言根据姓名模糊查询 -->
- <select id="listMessageCreatetime" resultMap="BaseResultMap">
- select * from message
- <where>
- <if test="name != null and name != '' ">
- and name like concat('%',#{name},'%')
- </if>
- </where>
- order by createtime desc
- </select>
- </mapper>
|