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.CtripConsumedVoucherMapper">
|
2025-08-07 00:25:08 +08:00
|
|
|
|
|
|
|
|
<!-- 结果映射 -->
|
2025-08-07 03:57:13 +08:00
|
|
|
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumedVoucher">
|
2025-08-07 00:25:08 +08:00
|
|
|
<id column="id" property="id" jdbcType="BIGINT"/>
|
|
|
|
|
<result column="consumed_id" property="consumedId" jdbcType="BIGINT"/>
|
|
|
|
|
<result column="voucher_id" property="voucherId" jdbcType="VARCHAR"/>
|
|
|
|
|
<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">
|
|
|
|
|
id, consumed_id, voucher_id, create_time, update_time, create_by, update_by, remark, tenant_id
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- 根据核销ID查询凭证列表 -->
|
|
|
|
|
<select id="selectByConsumedId" parameterType="long" resultMap="BaseResultMap">
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
FROM t_ctrip_consumed_voucher
|
|
|
|
|
WHERE consumed_id = #{consumedId,jdbcType=BIGINT}
|
|
|
|
|
ORDER BY create_time ASC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|