DepositOrderMapper.xml
2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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" />
<result column="ship_fee" property="shipFee" jdbcType="DECIMAL" />
<result column="contract_fee" property="contractFee" jdbcType="DECIMAL" />
<result column="late_fee" property="lateFee" jdbcType="DECIMAL" />
<result column="renew_fee" property="renewFee" jdbcType="DECIMAL" />
<result column="renew_day" property="renewDay" 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,ship_fee,contract_fee,
late_fee,renew_fee,renew_day
</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>
<select id="selectByDepositId" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from deposit_order
where deposit_id=#{depositId} and status=1
</select>
</mapper>