|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <?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.WxPayBillMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayBill">
- <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="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="bill_id" jdbcType="BIGINT" property="billId"/>
- <result column="b_user_id" jdbcType="BIGINT" property="bUserId"/>
- <result column="ip" jdbcType="VARCHAR" property="ip"/>
- <result column="pay_amount" jdbcType="INTEGER" property="payAmount"/>
- <result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart"/>
- <result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd"/>
- <result column="prepay_id" jdbcType="VARCHAR" property="prepayId"/>
- <result column="transaction_id" jdbcType="VARCHAR" property="transactionId"/>
- <result column="pay_vendor" jdbcType="INTEGER" property="payVendor"/>
- <result column="pay_bill_no" jdbcType="VARCHAR" property="payBillNo"/>
- <result column="pay_bill_status" jdbcType="INTEGER" property="payBillStatus"/>
- <result column="share" jdbcType="INTEGER" property="share"/>
- <result column="share_amount" jdbcType="INTEGER" property="shareAmount"/>
- <result column="fail_reason" jdbcType="VARCHAR" property="failReason"/>
- <result column="open_id" jdbcType="VARCHAR" property="openId"/>
- <result column="bill_type_value" jdbcType="VARCHAR" property="billTypeValue"/>
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`b_user_id`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`prepay_id`,`transaction_id`,`pay_vendor`,
- `pay_bill_no`,`pay_bill_status`,`share`,`share_amount`,`fail_reason`,`open_id`,`bill_type_value`
- </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 != createTime ">
- and `create_time` = #{createTime}
- </if>
-
- <if test=" null != updateTime ">
- and `update_time` = #{updateTime}
- </if>
-
- <if test=" null != billId ">
- and `bill_id` = #{billId}
- </if>
-
- <if test=" null != bUserId ">
- and `b_user_id` = #{bUserId}
- </if>
-
- <if test=" null != ip ">
- and `ip` like concat('%', #{ip},'%')
- </if>
-
- <if test=" null != payAmount ">
- and `pay_amount` = #{payAmount}
- </if>
-
- <if test=" null != payTimeStart ">
- and `pay_time_start` = #{payTimeStart}
- </if>
-
- <if test=" null != payTimeEnd ">
- and `pay_time_end` = #{payTimeEnd}
- </if>
-
- <if test=" null != prepayId ">
- and `prepay_d` like concat('%', #{prepayId},'%')
- </if>
-
- <if test=" null != transactionId ">
- and `transaction_id` like concat('%', #{transactionId},'%')
- </if>
-
- <if test=" null != payVendor ">
- and `pay_vendor` = #{payVendor}
- </if>
-
- <if test=" null != billTypeValue ">
- and `bill_type_value` = #{billTypeValue}
- </if>
-
- <if test=" null != payBillNo ">
- and `pay_bill_no` like concat('%', #{payBillNo},'%')
- </if>
-
- <if test=" null != payBillStatus ">
- and `pay_bill_status` = #{payBillStatus}
- </if>
- <if test=" null != share ">
- and `share` = #{share}
- </if>
- <if test=" null != shareAmount ">
- and `share_amount` = #{shareAmount}
- </if>
- <if test=" null != failReason ">
- and `fail_reason` like concat('%', #{failReason},'%')
- </if>
- <if test=" null != openId ">
- and `open_id` = #{openId}
- </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.WxPayBill" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_pay_bill
- <include refid="dynamicWhereConditions"/>
- </select>
-
- </mapper>
|