liujie
4 天以前 67d06a785d5fc4524639ace27651c01ff05a4b58
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?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.ruoyi.order.mapper.TChargingBillMapper">
 
 
    <select id="chargingBillList" resultType="com.ruoyi.order.api.vo.ChargingBillListVO">
    select t1.* from t_charging_bill t1
    where 1=1
        <if test="req.type != null and req.type!=0">
            and t1.type = #{req.type}
        </if>
        <if test="req.state != null ">
            and t1.status = #{req.state}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.bill_time between #{startTime1} and #{startTime2})
        </if>
        <if test="req.uid != null and req.uid!=''">
            and t1.id = #{req.uid}
        </if>
        <if test="null != req.siteIds and req.siteIds.size()>0" >
            and t1.site_id in
            <foreach collection="req.siteIds" close=")" open="(" item="item" separator=",">
            #{item}
            </foreach>
        </if>
        and t1.billType = 1
        and t1.del_flag = 0
    order by t1.create_time desc
    </select>
    <select id="chargingBillList1" resultType="com.ruoyi.order.api.vo.ChargingBillListVO">
    select t1.* from t_charging_bill t1
    where 1=1
        <if test="req.type != null ">
            and t1.type = #{req.type}
        </if>
      <if test="req.state != null ">
            and t1.status = #{req.state}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.bill_time between #{startTime1} and #{startTime2})
        </if>
        <if test="req.uid != null ">
            and t1.id = #{req.uid}
        </if>
        <if test="null != req.siteIds and req.siteIds.size()>0" >
            and t1.site_id in
            <foreach collection="req.siteIds" close=")" open="(" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        and t1.billType = 2
        and t1.del_flag = 0
        order by t1.create_time desc
    </select>
    <select id="chargingBillListNoLimit" resultType="com.ruoyi.order.api.vo.ChargingBillListVO">
        select t1.* from t_charging_bill t1
        where 1=1
        <if test="req.type != null and req.type!=0">
            and t1.type = #{req.type}
        </if>
        <if test="req.state != null ">
            and t1.status = #{req.state}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.bill_time between #{startTime1} and #{startTime2})
        </if>
        <if test="req.uid != null and req.uid!=''">
            and t1.id = #{req.uid}
        </if>
        <if test="null != req.siteIds and req.siteIds.size()>0" >
            and t1.site_id in
            <foreach collection="req.siteIds" close=")" open="(" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        and t1.billType = 1
        and t1.del_flag = 0
        order by t1.create_time desc
    </select>
    <select id="chargingBillList1Nolimt" resultType="com.ruoyi.order.api.vo.ChargingBillListVO">
        select t1.* from t_charging_bill t1
        where 1=1
        <if test="req.type != null ">
            and t1.type = #{req.type}
        </if>
        <if test="req.state != null ">
            and t1.status = #{req.state}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.bill_time between #{startTime1} and #{startTime2})
        </if>
        <if test="req.uid != null ">
            and t1.id = #{req.uid}
        </if>
        <if test="null != req.siteIds and req.siteIds.size()>0" >
            and t1.site_id in
            <foreach collection="req.siteIds" close=")" open="(" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        and t1.billType = 2
        and t1.del_flag = 0
        order by t1.create_time desc
    </select>
</mapper>