2025-08-07 00:25:08 +08:00
|
|
|
<?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">
|
2025-08-07 03:57:13 +08:00
|
|
|
<mapper namespace="com.central.coupon.mapper.CtripRefundMapper">
|
2025-08-07 00:25:08 +08:00
|
|
|
|
|
|
|
|
<!-- 结果映射 -->
|
2025-08-07 03:57:13 +08:00
|
|
|
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripRefund">
|
2025-08-07 00:25:08 +08:00
|
|
|
<id column="id" property="id" jdbcType="BIGINT"/>
|
|
|
|
|
<result column="ota_order_id" property="otaOrderId" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="supplier_order_id" property="supplierOrderId" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="sequence_id" property="sequenceId" jdbcType="VARCHAR"/>
|
2026-02-05 16:46:58 +08:00
|
|
|
<result column="refund_amount" property="refundAmount" jdbcType="DECIMAL"/>
|
|
|
|
|
<result column="currency" property="currency" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="refund_status" property="refundStatus" jdbcType="INTEGER"/>
|
2025-08-07 00:25:08 +08:00
|
|
|
<result column="confirm_result_code" property="confirmResultCode" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="confirm_result_message" property="confirmResultMessage" jdbcType="VARCHAR"/>
|
2026-02-05 16:46:58 +08:00
|
|
|
<result column="last_confirm_time" property="lastConfirmTime" jdbcType="TIMESTAMP"/>
|
2025-08-07 00:25:08 +08:00
|
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
|
|
|
|
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 基础字段 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
2026-02-05 16:46:58 +08:00
|
|
|
id, ota_order_id, supplier_order_id, sequence_id, refund_amount, currency,
|
|
|
|
|
refund_status, confirm_result_code, confirm_result_message, last_confirm_time,
|
2025-08-07 00:25:08 +08:00
|
|
|
create_time, update_time, create_by, update_by, remark, tenant_id
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- 根据携程订单号查询退款信息 -->
|
|
|
|
|
<select id="selectByOtaOrderId" parameterType="string" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
FROM t_ctrip_refund
|
|
|
|
|
WHERE ota_order_id = #{otaOrderId,jdbcType=VARCHAR}
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 根据供应商订单号查询退款信息 -->
|
|
|
|
|
<select id="selectBySupplierOrderId" parameterType="string" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
FROM t_ctrip_refund
|
|
|
|
|
WHERE supplier_order_id = #{supplierOrderId,jdbcType=VARCHAR}
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 根据携程批次流水号查询退款信息 -->
|
|
|
|
|
<select id="selectBySequenceId" parameterType="string" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
FROM t_ctrip_refund
|
|
|
|
|
WHERE sequence_id = #{sequenceId,jdbcType=VARCHAR}
|
|
|
|
|
LIMIT 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|