|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?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.WxGameMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxGame">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
- <result column="game_id" jdbcType="INTEGER" property="gameId" />
- <result column="status" jdbcType="INTEGER" property="status" />
- <result column="coupon_ids" jdbcType="VARCHAR" property="couponIds" />
- <result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate" />
- <result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate" />
- <result column="triggle_action" jdbcType="INTEGER" property="triggleAction" />
- <result column="play_limit" jdbcType="INTEGER" property="playLimit" />
- <result column="award_limit" jdbcType="INTEGER" property="awardLimit" />
-
- <result column="play_credit_limit" jdbcType="INTEGER" property="playCreditLimit" />
- <result column="play_credit" jdbcType="INTEGER" property="playCredit" />
- <result column="limit_type" jdbcType="INTEGER" property="limitType" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`game_id`,`status`,`coupon_ids`,`valid_start_date`,`valid_end_date`,`triggle_action`,`play_limit`,`award_limit`,`play_credit_limit`,`play_credit`,`limit_type`
- </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 != gameId ">
- and `game_id` = #{gameId}
- </if>
-
- <if test=" null != status ">
- and `status` = #{status}
- </if>
-
- <if test=" null != validStartDate ">
- and `valid_start_date` = #{validStartDate}
- </if>
-
- <if test=" null != validEndDate ">
- and `valid_end_date` = #{validEndDate}
- </if>
-
- <if test=" null != triggleAction ">
- and `triggle_action` = #{triggleAction}
- </if>
-
- <if test=" null != playLimit ">
- and `play_limit` = #{playLimit}
- </if>
-
- <if test=" null != awardLimit ">
- and `award_limit` = #{awardLimit}
- </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.WxGame" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_game
- <include refid="dynamicWhereConditions" />
- </select>
-
-
- </mapper>
|