From 69fa32b79d815913da87c728f18f32b41d500b1b Mon Sep 17 00:00:00 2001 From: yuyang <2265829957@qq.com> Date: Thu, 11 Nov 2021 01:22:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E6=97=B6=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/XhpcHistoryOrderMapper.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml index 9d470a3f..bd1c4480 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcHistoryOrderMapper.xml @@ -610,7 +610,7 @@ left join xhpc_terminal as ter on ter.terminal_id = ho.terminal_id left join xhpc_charging_pile as cp on cp.charging_pile_id = ter.charging_pile_id left join et_dispute_orders as ed on ed.start_charge_seq = ho.internet_serial_number and ed.dispute_order_status !=2 - where ho.status =0 and ho.del_flag=0 and ho.total_price !=null + where ho.status =0 and ho.del_flag=0 and ho.total_price !=0 and ho.type=#{type} @@ -624,7 +624,7 @@ and ho.serial_number like concat('%', #{transactionNumber}, '%') - and ct.name like concat('%', #{transactionNumber}, '%') + and ct.name like concat('%', #{chargingStationName}, '%') and op.operator_id =#{operatorId} @@ -670,8 +670,13 @@ from xhpc_rate_time as rt left join xhpc_rate ra on rt.rate_id =ra.rate_id where rt.rate_model_id=#{rateModelId} - and ((rt.start_time < #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') > #{startTime}) - or (rt.start_time < #{endTime} and replace(rt.end_time, '00:00:00', '23:59:59') > #{endTime})) + and ( + (rt.start_time <= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') >= #{endTime} ) + OR + (rt.start_time <= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') >= #{startTime} and replace(rt.end_time, '00:00:00', '23:59:59') <= #{endTime}) + OR + (rt.start_time <= #{endTime} and replace(rt.end_time, '00:00:00', '23:59:59') >= #{endTime}) + )