46 lines
2.4 KiB
XML
46 lines
2.4 KiB
XML
|
|
<?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.xhpc.order.mapper.HxpcChargeOrderMapper">
|
||
|
|
|
||
|
|
<resultMap type="com.xhpc.order.domain.HxpcChargeOrder" id="HxpcChargeOrderResult">
|
||
|
|
<result column="charge_order_id" property="chargeOrderId"/>
|
||
|
|
<result column="charging_station_id" property="chargingStationId"/>
|
||
|
|
<result column="user_id" property="userId"/>
|
||
|
|
<result column="terminal_id" property="terminalId"/>
|
||
|
|
<result column="internet_serial_number" property="internetSerialNumber"/>
|
||
|
|
<result column="serial_number" property="serialNumber"/>
|
||
|
|
<result column="start_soc" property="startSoc"/>
|
||
|
|
<result column="source" property="source"/>
|
||
|
|
<result column="status" property="status"/>
|
||
|
|
<result column="del_flag" property="delFlag"/>
|
||
|
|
<result column="create_time" property="createTime"/>
|
||
|
|
<result column="create_by" property="createBy"/>
|
||
|
|
<result column="update_time" property="updateTime"/>
|
||
|
|
<result column="update_by" property="updateBy"/>
|
||
|
|
<result column="remark" property="remark"/>
|
||
|
|
<result column="rate_model_id" property="rateModelId"/>
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<select id="getHistotyChargeOrderMessage" resultType="map">
|
||
|
|
select
|
||
|
|
rto.real_time_order_id as realTimeOrderId,
|
||
|
|
rto.charging_order_id as chargingOrderId,
|
||
|
|
rto.voltage as voltage,
|
||
|
|
rto.electric_current as electricCurrent,
|
||
|
|
(select power from xhpc_charging_pile where charging_pile_id=
|
||
|
|
(select charging_pile_id from xhpc_terminal where serial_number=rto.pile_number and del_flag=0 LIMIT 1))power,
|
||
|
|
rto.soc as soc,
|
||
|
|
rto.gun_number as gunNumber,
|
||
|
|
rto.charging_degree as chargingDegree,
|
||
|
|
rto.charging_time as chargingTime,
|
||
|
|
rto.remaining_time as remainingTime,
|
||
|
|
rto.amount_charged as amountCharged,
|
||
|
|
au.balance as balance
|
||
|
|
from xhpc_real_time_order as rto
|
||
|
|
LEFT JOIN xhpc_app_user as au on au.app_user_id = rto.user_id
|
||
|
|
where rto.charging_order_id =(select charge_order_id from xhpc_charge_order where status =0 and source = 0 ORDER BY create_time desc LIMIT 1)
|
||
|
|
and rto.user_id=#{userId}
|
||
|
|
</select>
|
||
|
|
</mapper>
|