DepositOrderMapper.xml
1.48 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.DepositOrderMapper">
<resultMap id="BaseResultMap" type="com.yoho.order.model.DepositOrder">
<result column="id" property="id" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
<result column="order_code" property="orderCode" jdbcType="BIGINT" />
<result column="deposit_code" property="depositCode" jdbcType="VARCHAR" />
<result column="amount" property="amount" jdbcType="DECIMAL" />
<result column="payment" property="payment" jdbcType="INTEGER" />
<result column="client_type" property="clientType" jdbcType="INTEGER" />
<result column="event_type" property="eventType" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="update_time" property="updateTime" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, deposit_code, amount, payment, client_type, event_type, status, create_time, update_time
</sql>
<select id="selectByDepositCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from deposit_order
where deposit_code=#{depositCode} and status=1
limit 1
</select>
</mapper>