Files
gofly-platform-services/zlt-business/coupon-center/src/main/resources/mapper/CtripRefundItemMapper.xml
T

36 lines
1.7 KiB
XML

<?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">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.order.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"/>
<result column="plu" property="plu" jdbcType="VARCHAR"/>
<result column="amount" property="amount" jdbcType="DECIMAL"/>
<result column="amount_currency" property="amountCurrency" 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, refund_id, item_id, plu, amount, amount_currency,
create_time, update_time, create_by, update_by, remark, tenant_id
</sql>
<!-- 根据退款ID查询退款项列表 -->
<select id="selectByRefundId" parameterType="long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_refund_item
WHERE refund_id = #{refundId,jdbcType=BIGINT}
ORDER BY create_time ASC
</select>
</mapper>