|
- <?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.WxCardDailyLogMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCardDailyLog">
- <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="card_password_id" jdbcType="BIGINT" property="cardPasswordId"/>
- <result column="ip" jdbcType="VARCHAR" property="ip"/>
- <result column="price" jdbcType="INTEGER" property="price"/>
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
- <result column="operator_type" jdbcType="INTEGER" property="operatorType"/>
- <result column="operator_id" jdbcType="BIGINT" property="operatorId"/>
- <result column="operator_user" jdbcType="VARCHAR" property="operatorUser"/>
- <result column="remark" jdbcType="VARCHAR" property="remark"/>
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`card_password_id`,`ip`,`create_date`,`update_date`,
- `price`,`operator_type`,`operator_id`,`operator_user`, `remark`
- </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 != cardPasswordId ">
- and `card_password_id` = #{cardPasswordId}
- </if>
- <if test=" null != operatorType ">
- and `operator_type` = #{operatorType}
- </if>
- <if test=" null != operatorId ">
- and `operator_id` = #{operatorId}
- </if>
- <if test=" null != operatorUser and '' != operatorUser">
- and `operator_user` like concat('%', #{operatorUser},'%')
- </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.WxCardDailyLog" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_card_set_price
- <include refid="dynamicWhereConditions"/>
- </select>
-
-
- </mapper>
|