OrdersPayMapper.xml
1.34 KB
<?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.OrdersPayMapper">
<resultMap id="BaseResultMap" type="com.yoho.order.model.OrdersPay">
<result column="id" property="id" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="order_code" property="orderCode" jdbcType="BIGINT" />
<result column="payment" property="payment" jdbcType="INTEGER" />
<result column="amount" property="amount" jdbcType="DECIMAL" />
<result column="pay_order_code" property="payOrderCode" jdbcType="VARCHAR" />
<result column="pay_level" property="payLevel" jdbcType="INTEGER" />
<result column="serial_no" property="serialNo" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="attach" property="attach" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, payment, amount, pay_order_code, pay_level, serial_no, create_time, attach
</sql>
<select id="selectByOrderCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from orders_pay where order_code = #{orderCode} limit 1
</select>
</mapper>