|
@@ -1,7 +1,6 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.xy.mapper.DeviceChargingMapper">
|
|
<mapper namespace="com.xy.mapper.DeviceChargingMapper">
|
|
-
|
|
|
|
<resultMap id="queryPageMap" type="com.xy.dto.DeviceChargingDto$PageVo">
|
|
<resultMap id="queryPageMap" type="com.xy.dto.DeviceChargingDto$PageVo">
|
|
<association property="deviceInfo" javaType="com.xy.dto.DeviceInfoDto$Vo">
|
|
<association property="deviceInfo" javaType="com.xy.dto.DeviceInfoDto$Vo">
|
|
<id column="device_id" property="deviceId"/>
|
|
<id column="device_id" property="deviceId"/>
|
|
@@ -29,16 +28,18 @@
|
|
</association>
|
|
</association>
|
|
</association>
|
|
</association>
|
|
<association property="deviceCharging" javaType="com.xy.dto.DeviceChargingDto$Vo">
|
|
<association property="deviceCharging" javaType="com.xy.dto.DeviceChargingDto$Vo">
|
|
- <result column="charging_sum_money" property="chargingSumMoney" />
|
|
|
|
- <result column="timeout" property="timeout" />
|
|
|
|
- <result column="last_charging_time" property="lastChargingTime" />
|
|
|
|
- <result column="charging_create_time" property="createTime" />
|
|
|
|
|
|
+ <result column="charging_sum_money" property="chargingSumMoney"/>
|
|
|
|
+ <result column="timeout" property="timeout"/>
|
|
|
|
+ <result column="last_charging_time" property="lastChargingTime"/>
|
|
|
|
+ <result column="charging_create_time" property="createTime"/>
|
|
</association>
|
|
</association>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<select id="page" resultMap="queryPageMap">
|
|
<select id="page" resultMap="queryPageMap">
|
|
select di.*,
|
|
select di.*,
|
|
ds.net_state,
|
|
ds.net_state,
|
|
|
|
+ dc.last_charging_money,
|
|
|
|
+ dc.last_charging_pay_type,
|
|
dc.charging_sum_money, dc.timeout, dc.last_charging_time, dc.create_time as charging_create_time
|
|
dc.charging_sum_money, dc.timeout, dc.last_charging_time, dc.create_time as charging_create_time
|
|
from device_info di
|
|
from device_info di
|
|
join device_status ds on (di.device_id = ds.device_id)
|
|
join device_status ds on (di.device_id = ds.device_id)
|
|
@@ -54,7 +55,7 @@
|
|
<if test="queryPage.chargingStatus != null and queryPage.chargingStatus != ''">
|
|
<if test="queryPage.chargingStatus != null and queryPage.chargingStatus != ''">
|
|
<!-- 即将过期 -->
|
|
<!-- 即将过期 -->
|
|
<if test="queryPage.chargingStatus == 1">
|
|
<if test="queryPage.chargingStatus == 1">
|
|
- and dc.timeout >= #{queryPage.thisTime} and dc.timeout <= #{queryPage.theTime}
|
|
|
|
|
|
+ and dc.timeout >= #{queryPage.thisTime} and dc.timeout <= #{queryPage.theTime}
|
|
</if>
|
|
</if>
|
|
<!-- 已过期 -->
|
|
<!-- 已过期 -->
|
|
<if test="queryPage.chargingStatus == 2">
|
|
<if test="queryPage.chargingStatus == 2">
|