12345678910111213141516171819202122 |
- <?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.EmailMapper" >
- <resultMap id="BaseResultMap" type="com.yc.education.model.Email" >
- <!--
- WARNING - @mbggenerated
- -->
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="name" property="name" jdbcType="VARCHAR" />
- <result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
- </resultMap>
- <!-- 后台通讯订阅根据邮箱名称模糊查询 -->
- <select id="listEmail" resultMap="BaseResultMap">
- select * from email
- <where>
- <if test="name != null and name != '' ">
- and name like concat('%',#{name},'%')
- </if>
- </where>
- order by createtime desc
- </select>
- </mapper>
|