59 lines
2.0 KiB
XML
Executable File
59 lines
2.0 KiB
XML
Executable File
<?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.bsd.pjcloud.thirdparty.mapper.pay.ThirdPayOrderMapper">
|
|
<sql id="selectA">
|
|
select a.id,
|
|
a.pay_platform_type,
|
|
a.biz_type,
|
|
a.biz_id,
|
|
a.user_id,
|
|
a.user_code,
|
|
a.price,
|
|
a.status,
|
|
a.pay_no,
|
|
a.pay_time,
|
|
a.pay_res,
|
|
a.refund_no,
|
|
a.refund_time,
|
|
a.refund_res,
|
|
a.expire_time,
|
|
a.create_time,
|
|
a.update_time,
|
|
a.create_by,
|
|
a.update_by,
|
|
a.del_flag,
|
|
a.tenant_id
|
|
</sql>
|
|
|
|
<sql id="whereA">
|
|
a.del_flag = '0'
|
|
<if test="dto.id != null">
|
|
and a.id = #{dto.id}
|
|
</if>
|
|
<if test="dto.payPlatformType != null and dto.payPlatformType != '' ">
|
|
and a.pay_platform_type = #{dto.payPlatformType}
|
|
</if>
|
|
<if test="dto.bizType != null and dto.bizType != '' ">
|
|
and a.biz_type = #{dto.bizType}
|
|
</if>
|
|
<if test="dto.userId != null">
|
|
and a.user_id = #{dto.userId}
|
|
</if>
|
|
<if test="dto.payTimeList != null and dto.payTimeList.length == 2">
|
|
and a.pay_time between #{dto.payTimeList[0]} and #{dto.payTimeList[1]}
|
|
</if>
|
|
<if test="dto.refundTimeList != null and dto.refundTimeList.length == 2">
|
|
and a.refund_time between #{dto.refundTimeList[0]} and #{dto.refundTimeList[1]}
|
|
</if>
|
|
</sql>
|
|
|
|
<select id="scopePage" resultType="com.bsd.pjcloud.thirdparty.vo.pay.ThirdPayOrderVo">
|
|
<include refid="selectA"/>
|
|
from third_pay_order a
|
|
<where>
|
|
<include refid="whereA"/>
|
|
</where>
|
|
order by a.create_time desc, a.id desc
|
|
</select>
|
|
</mapper> |