|
- <?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.simple.mapper.WxImgUrlMapper">
- <resultMap id="BaseResultMap" type="com.simple.domain.po.WxImgUrl">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="address" jdbcType="VARCHAR" property="address" />
- <result column="sign" jdbcType="VARCHAR" property="sign" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`address`,`sign`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
-
- </if>
-
- <if test=" null != address ">
- and `address` like concat('%', #{address},'%')
-
- </if>
-
- <if test=" null != sign ">
- and `sign` like concat('%', #{sign},'%')
-
- </if>
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="findList" parameterType="com.simple.domain.po.WxImgUrl" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_img_url
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|