fix(优惠券中心):优惠券中心业务和携程接口对接打通

This commit is contained in:
2025-08-07 03:57:13 +08:00
parent 5aa8f61d71
commit 0dd7f4a0d4
11 changed files with 873 additions and 215 deletions
@@ -119,4 +119,12 @@
AND valid_end_time < NOW()
</update>
<!-- 检查用户手机号和携程优惠券ID是否已存在 -->
<select id="countByUserPhoneAndCtripCouponId" resultType="int">
SELECT COUNT(*)
FROM t_coupon
WHERE user_phone = #{userPhone}
AND ctrip_coupon_id = #{ctripCouponId}
</select>
</mapper>
@@ -1,9 +1,9 @@
<?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.central.order.mapper.CtripConsumedMapper">
<mapper namespace="com.central.coupon.mapper.CtripConsumedMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.order.entity.CtripConsumed">
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumed">
<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"/>
@@ -1,9 +1,9 @@
<?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.central.order.mapper.CtripConsumedPassengerMapper">
<mapper namespace="com.central.coupon.mapper.CtripConsumedPassengerMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.order.entity.CtripConsumedPassenger">
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumedPassenger">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="consumed_id" property="consumedId" jdbcType="BIGINT"/>
<result column="passenger_id" property="passengerId" jdbcType="VARCHAR"/>
@@ -1,9 +1,9 @@
<?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.central.order.mapper.CtripConsumedVoucherMapper">
<mapper namespace="com.central.coupon.mapper.CtripConsumedVoucherMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.order.entity.CtripConsumedVoucher">
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumedVoucher">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="consumed_id" property="consumedId" jdbcType="BIGINT"/>
<result column="voucher_id" property="voucherId" jdbcType="VARCHAR"/>
@@ -1,9 +1,9 @@
<?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.central.order.mapper.CtripPassengerMapper">
<mapper namespace="com.central.coupon.mapper.CtripPassengerMapper">
<!-- 根据订单项ID查询乘客列表 -->
<select id="selectByOrderItemId" resultType="com.central.order.entity.CtripPassenger">
<select id="selectByOrderItemId" resultType="com.central.coupon.entity.CtripPassenger">
SELECT
id,
order_item_id,
@@ -1,9 +1,9 @@
<?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.central.order.mapper.CtripRefundItemMapper">
<mapper namespace="com.central.coupon.mapper.CtripRefundItemMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.order.entity.CtripRefundItem">
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripRefundItem">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="refund_id" property="refundId" jdbcType="BIGINT"/>
<result column="item_id" property="itemId" jdbcType="VARCHAR"/>
@@ -1,9 +1,9 @@
<?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.central.order.mapper.CtripRefundMapper">
<mapper namespace="com.central.coupon.mapper.CtripRefundMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.order.entity.CtripRefund">
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripRefund">
<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"/>