|
- <?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.iformall.mapper.WxChannelMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxChannel">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="channel_id" jdbcType="INTEGER" property="channelId" />
- <result column="title" jdbcType="VARCHAR" property="title" />
- <result column="img" jdbcType="VARCHAR" property="img" />
- <result column="batch" jdbcType="INTEGER" property="batch" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`channel_id`,`title`,`img`,`batch`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != channelId ">
- and `channel_id` = #{channelId}
- </if>
-
- <if test=" null != title ">
- and `title` like concat('%', #{title},'%')
- </if>
-
- <if test=" null != img ">
- and `img` like concat('%', #{img},'%')
- </if>
- <if test=" null != batch ">
- and `batch` = #{batch}
- </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.iformall.domain.po.WxChannel" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_channel
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|