无关风月
2025-07-23 7fd053651ac11db87fe4f6c57e65eed3b9a59452
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
<?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.ChargeOrderMapper">
 
 
    <select id="getUserPointPageList" resultType="com.ruoyi.order.model.ChargeOrder">
        select * from t_charge_order
        where
            1=1
        <if test="dto.orderNumber != null and dto.orderNumber != ''">
            AND order_number LIKE CONCAT('%', #{dto.orderNumber}, '%')
        </if>
        <if test="dto.phone != null and dto.phone != ''">
            AND phone LIKE CONCAT('%', #{dto.phone}, '%')
        </if>
        <if test="dto.chargingStation != null and dto.chargingStation != ''">
            AND charging_station LIKE CONCAT('%', #{dto.chargingStation}, '%')
        </if>
        <if test="dto.powerStationOperator != null and dto.powerStationOperator != ''">
            AND power_station_operator LIKE CONCAT('%', #{dto.powerStationOperator}, '%')
        </if>
        <if test="dto.terminalCode != null and dto.terminalCode != ''">
            AND terminal_code LIKE CONCAT('%', #{dto.terminalCode}, '%')
        </if>
        <if test="dto.beginTime1 != null and dto.endTime1 != null ">
            AND begin_time between #{dto.beginTime1} and #{dto.endTime1}
        </if>
 
        <if test="dto.beginTime2 != null and dto.endTime2 != null">
            AND end_time between #{dto.beginTime2 } and  #{dto.endTime2  }
        </if>
      order by begin_time DESC
    </select>
</mapper>