|
- <?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.WxVtwoActivityGrantAwardMapper">
-
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrantAward">
- <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="grantId" column="grant_id" jdbcType="BIGINT"/>
- <result property="orderId" column="order_id" jdbcType="BIGINT"/>
- <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/>
- <result property="modeType" column="mode_type" jdbcType="SMALLINT"/>
- <result property="minAmount" column="min_amount" jdbcType="DECIMAL"/>
- <result property="maxAmount" column="max_amount" jdbcType="DECIMAL"/>
- <result property="relatedCount" column="related_count" jdbcType="INTEGER"/>
- <result property="awardId" column="award_id" jdbcType="BIGINT"/>
- <result property="awardGrade" column="award_grade" jdbcType="INTEGER"/>
- <result property="awardName" column="award_name" jdbcType="VARCHAR"/>
- <result property="awardPrice" column="award_price" jdbcType="DECIMAL"/>
- <result property="awardCount" column="award_count" jdbcType="INTEGER"/>
- <result property="grantPrice" column="grant_price" jdbcType="DECIMAL"/>
- <result property="moneyRule" column="money_rule" jdbcType="SMALLINT"/>
- <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/>
- <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/>
- <result property="status" column="status" jdbcType="SMALLINT"/>
- <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,grant_id,
- order_id,order_amount,mode_type,
- min_amount,max_amount,related_count,
- award_id,award_grade,award_name,
- award_price,award_count,grant_price,
- money_rule,mall_share_rate,merchant_share_rate,
- status,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 != orderId ">
- and `order_id` = #{orderId}
- </if>
- <if test=" null != grantId ">
- and `grant_id` = #{grantId}
- </if>
- <if test=" null != modeType ">
- and `mode_type` = #{modeType}
- </if>
- <if test=" null != awardId ">
- and `award_id` = #{awardId}
- </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.WxVtwoActivityGrantAward" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_vtwo_activity_grant_award
- <include refid="dynamicWhereConditions" />
- </select>
-
- <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_vtwo_activity_grant_award
- where id = #{id} and tenant_id=#{tenantId}
- </select>
- </mapper>
|