|
- <?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.WxMerchantMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchant">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="link_phone" jdbcType="VARCHAR" property="linkPhone" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- <result column="car_vendor_type" jdbcType="INTEGER" property="carVendorType" />
- <result column="car_params" jdbcType="VARCHAR" property="carParams" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="link_person" jdbcType="VARCHAR" property="linkPerson" />
-
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
-
- </if>
-
- <if test=" null != tenantId ">
- and `tenant_id` = #{tenantId}
-
- </if>
-
- <if test=" null != imgUrl ">
- and `img_url` like concat('%', #{imgUrl},'%')
-
- </if>
-
- <if test=" null != name ">
- and `name` like concat('%', #{name},'%')
-
- </if>
-
- <if test=" null != linkPhone ">
- and `link_phone` like concat('%', #{linkPhone},'%')
-
- </if>
-
- <if test=" null != createDate ">
- and `create_date` = #{createDate}
-
- </if>
-
- <if test=" null != updateDate ">
- and `update_date` = #{updateDate}
-
- </if>
-
- <if test=" null != carVendorType ">
- and `car_vendor_type` = #{carVendorType}
-
- </if>
-
- <if test=" null != carParams ">
- and `car_params` like concat('%', #{carParams},'%')
-
- </if>
-
-
- <if test=" null != status ">
- and `status` = #{status}
-
- </if>
- <if test=" null != linkPerson ">
- and `link_person` = #{linkPerson}
-
- </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.WxMerchant" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_merchant
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|