OrderCouponMapper.xml
981 Bytes
<?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.yoho.order.dal.OrderCouponMapper">
<resultMap id="BaseResultMap" type="com.yoho.order.model.OrderCoupon">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="uid" jdbcType="INTEGER" property="uid"/>
<result column="order_code" jdbcType="BIGINT" property="orderCode"/>
<result column="coupon_code" jdbcType="VARCHAR" property="couponCode"/>
<result column="create_time" jdbcType="INTEGER" property="createTime"/>
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, coupon_code, create_time
</sql>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from order_coupon
where order_code = #{orderCode,jdbcType=BIGINT}
</select>
</mapper>