|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?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.MemCouponFromDspMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.MemCouponFromDsp">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="phone" jdbcType="VARCHAR" property="phone" />
- <result column="coupon_channel_id" jdbcType="BIGINT" property="couponChannelId" />
- <result column="coupon_id" jdbcType="BIGINT" property="couponId" />
- <result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- <result column="status" jdbcType="INTEGER" property="status" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`phone`,`coupon_channel_id`,`coupon_id`,`coupon_order_id`,`create_date`,`update_date`,`status`
- </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 != phone ">
- and `phone` = #{phone}
- </if>
- <if test=" null != couponChannelId ">
- and `coupon_channel_id` = #{couponChannelId}
- </if>
- <if test=" null != couponId ">
- and `coupon_id` = #{couponId}
- </if>
- <if test=" null != couponOrderId ">
- and `coupon_order_id` = #{couponOrderId}
- </if>
- <if test=" null != createDate ">
- and `create_date` = #{createDate}
- </if>
- <if test=" null != updateDate ">
- and `update_date` = #{updateDate}
- </if>
- <if test=" null != status ">
- and `status` = #{status}
- </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.MemCouponFromDsp" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from mem_coupon_from_dsp
- <include refid="dynamicWhereConditions" />
- </select>
-
-
-
-
-
-
- </mapper>
|