|
|
|
@@ -1,122 +1,109 @@ |
|
|
|
<?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.simple.mapper.WxPayOrderMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.simple.domain.po.WxPayOrder"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> |
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|
|
|
<result column="order_id" jdbcType="BIGINT" property="orderId" /> |
|
|
|
<result column="c_user_id" jdbcType="BIGINT" property="cUserId" /> |
|
|
|
<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="transaction_id" jdbcType="VARCHAR" property="transactionId" /> |
|
|
|
<result column="pay_vendor" jdbcType="INTEGER" property="payVendor" /> |
|
|
|
<result column="pay_order_no" jdbcType="VARCHAR" property="payOrderNo" /> |
|
|
|
<result column="pay_order_status" jdbcType="INTEGER" property="payOrderStatus" /> |
|
|
|
<result column="fail_reason" jdbcType="VARCHAR" property="failReason" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`tenant_id`,`create_time`,`update_time`,`order_id`,`c_user_id`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`transaction_id`,`pay_vendor`,`pay_order_no`,`pay_order_status`,`fail_reason` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1 = 1 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and `id` = #{id} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != tenantId "> |
|
|
|
and `tenant_id` like concat('%', #{tenantId},'%') |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != createTime "> |
|
|
|
and `create_time` = #{createTime} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != updateTime "> |
|
|
|
and `update_time` = #{updateTime} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != orderId "> |
|
|
|
and `order_id` = #{orderId} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != cUserId "> |
|
|
|
and `c_user_id` = #{cUserId} |
|
|
|
|
|
|
|
</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 != transactionId "> |
|
|
|
and `transaction_id` like concat('%', #{transactionId},'%') |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != payVendor "> |
|
|
|
and `pay_vendor` = #{payVendor} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != payOrderNo "> |
|
|
|
and `pay_order_no` like concat('%', #{payOrderNo},'%') |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != payOrderStatus "> |
|
|
|
and `pay_order_status` = #{payOrderStatus} |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != failReason "> |
|
|
|
and `fail_reason` like concat('%', #{failReason},'%') |
|
|
|
|
|
|
|
</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.simple.domain.po.WxPayOrder" resultMap="BaseResultMap"> |
|
|
|
select <include refid="allColumns" /> from wx_pay_order |
|
|
|
<include refid="dynamicWhereConditions" /> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.simple.domain.po.WxPayOrder"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> |
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> |
|
|
|
<result column="order_id" jdbcType="BIGINT" property="orderId"/> |
|
|
|
<result column="c_user_id" jdbcType="BIGINT" property="cUserId"/> |
|
|
|
<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_order_no" jdbcType="VARCHAR" property="payOrderNo"/> |
|
|
|
<result column="pay_order_status" jdbcType="INTEGER" property="payOrderStatus"/> |
|
|
|
<result column="fail_reason" jdbcType="VARCHAR" property="failReason"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`tenant_id`,`create_time`,`update_time`,`order_id`,`c_user_id`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`prepay_id`,`transaction_id`,`pay_vendor`,`pay_order_no`,`pay_order_status`,`fail_reason` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
where 1 = 1 |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and `id` = #{id} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != tenantId "> |
|
|
|
and `tenant_id` like concat('%', #{tenantId},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != createTime "> |
|
|
|
and `create_time` = #{createTime} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != updateTime "> |
|
|
|
and `update_time` = #{updateTime} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != orderId "> |
|
|
|
and `order_id` = #{orderId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != cUserId "> |
|
|
|
and `c_user_id` = #{cUserId} |
|
|
|
</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 != payOrderNo "> |
|
|
|
and `pay_order_no` like concat('%', #{payOrderNo},'%') |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != payOrderStatus "> |
|
|
|
and `pay_order_status` = #{payOrderStatus} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != failReason "> |
|
|
|
and `fail_reason` like concat('%', #{failReason},'%') |
|
|
|
</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.simple.domain.po.WxPayOrder" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="allColumns"/> |
|
|
|
from wx_pay_order |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |