|
- <?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.WxVtwoActivityGrantMapper">
-
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrant">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/>
- <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/>
- <result property="activityId" column="activity_id" jdbcType="BIGINT"/>
- <result property="activityName" column="activity_name" jdbcType="VARCHAR"/>
- <result property="orderMoneySum" column="order_money_sum" jdbcType="DECIMAL"/>
- <result property="orderCount" column="order_count" jdbcType="INTEGER"/>
- <result property="cusName" column="cus_name" jdbcType="VARCHAR"/>
- <result property="cusPhone" column="cus_phone" jdbcType="VARCHAR"/>
- <result property="lotteryNum" column="lottery_num" jdbcType="VARCHAR"/>
- <result property="lotteryCount" column="lottery_count" jdbcType="INTEGER"/>
- <result property="anniversaryLotteryNum" column="anniversary_lottery_num" jdbcType="VARCHAR"/>
- <result property="realName" column="real_name" jdbcType="VARCHAR"/>
- <result property="realCard" column="real_card" jdbcType="VARCHAR"/>
- <result property="remark" column="remark" jdbcType="VARCHAR"/>
- <result property="signImg" column="sign_img" jdbcType="VARCHAR"/>
- <result property="status" column="status" jdbcType="SMALLINT"/>
- <result property="createBy" column="create_by" jdbcType="BIGINT"/>
- <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
- <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
- </resultMap>
-
- <sql id="allColumns">
- id,tenant_id,parent_tenant_id,
- activity_id,activity_name,order_money_sum,
- order_count,cus_name,cus_phone,
- lottery_num,lottery_count,anniversary_lottery_num,
- real_name,real_card,remark,sign_img,
- status,create_by,create_date,
- update_date
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
- <if test=" null != activityId ">
- and `activity_id` = #{activityId}
- </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.WxVtwoActivityGrant" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_vtwo_activity_grant
- <include refid="dynamicWhereConditions" />
- </select>
-
- <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_vtwo_activity_grant
- where id = #{id} and tenant_id=#{tenantId}
- </select>
- </mapper>
|