TBillingPrepaymentSMapper.xml
1.96 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
42
43
44
45
46
47
<?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.zteits.bill.mapper.smapper.TBillingPrepaymentSMapper">
<resultMap id="BaseResultMap" type="com.zteits.bill.domain.TBillingPrepayment">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="pl_no" property="plNo" jdbcType="VARCHAR"/>
<result column="pl_name" property="plName" jdbcType="VARCHAR"/>
<result column="car_type" property="carType" jdbcType="INTEGER"/>
<result column="prepayment" property="prepayment" jdbcType="BIGINT"/>
<result column="effect_time" property="effectTime" jdbcType="TIMESTAMP"/>
<result column="expire_time" property="expireTime" jdbcType="TIMESTAMP"/>
<result column="create_op" property="createOp" jdbcType="INTEGER"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="modify_op" property="modifyOp" jdbcType="INTEGER"/>
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, pl_no, pl_name, car_type, prepayment, effect_time, expire_time, create_op, create_time,
modify_op, modify_time
</sql>
<select id="queryBillingPrepayment" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_billing_prepayment t
WHERE t.effect_time <= now() AND t.expire_time >= now()
AND t.pl_no = #{plNo}
AND t.car_type = #{carType}
ORDER BY t.effect_time desc
</select>
<select id="queryBillingPrepaymentInfo" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_billing_prepayment t
WHERE t.effect_time <= now() AND t.expire_time >= now()
AND t.pl_no = #{plNo}
ORDER BY t.effect_time desc
</select>
</mapper>