2021-07-20 16:51:57 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
2021-08-05 17:30:26 +08:00
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2021-07-20 16:51:57 +08:00
|
|
|
<mapper namespace="com.xhpc.charging.station.mapper.XhpcRateTimeMapper">
|
2021-07-28 18:07:25 +08:00
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcRateTime">
|
|
|
|
|
<result property="rateTimeId" column="rate_time_id"/>
|
|
|
|
|
<result property="chargingStationId" column="charging_station_id"/>
|
|
|
|
|
<result property="rateId" column="rate_id"/>
|
|
|
|
|
<result property="startTime" column="start_time"/>
|
|
|
|
|
<result property="endTime" column="end_time"/>
|
|
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="rateModelId" column="rate_model_id"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
2021-08-05 17:30:26 +08:00
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
<result property="sort" column="sort"/>
|
|
|
|
|
<result property="type" column="type"/>
|
2021-07-29 17:39:20 +08:00
|
|
|
<result property="rateValue" column="rate_value"/>
|
2021-07-20 16:51:57 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
2021-07-22 13:52:21 +08:00
|
|
|
<select id="getXhpcRateTime" resultType="map">
|
2021-08-05 17:30:26 +08:00
|
|
|
select rate_time_id as rateTimeId,
|
|
|
|
|
rate_id as rateId,
|
|
|
|
|
start_time as startTime,
|
|
|
|
|
end_time as endTime
|
|
|
|
|
from xhpc_rate_time
|
|
|
|
|
where charging_station_id = #{datchargingStationId}
|
|
|
|
|
and start_time <= #{date}
|
2021-09-28 12:05:22 +08:00
|
|
|
and replace(end_time, '00:00:00', '24:00:00') >= #{date}
|
2021-08-05 17:30:26 +08:00
|
|
|
and status = 0
|
|
|
|
|
and del_flag = 0
|
2021-09-28 14:45:09 +08:00
|
|
|
limit 1
|
2021-07-20 16:51:57 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getXhpcTimeType" resultType="map">
|
2021-08-05 17:30:26 +08:00
|
|
|
select ra.power_fee as powerFee,
|
|
|
|
|
ra.service_fee as serviceFee
|
2021-07-20 16:51:57 +08:00
|
|
|
from xhpc_rate as ra
|
2021-08-05 17:30:26 +08:00
|
|
|
where ra.charging_station_id = #{datchargingStationId}
|
|
|
|
|
and ra.status = 0
|
|
|
|
|
and ra.del_flag = 0
|
|
|
|
|
and ra.rate_id = #{rateId}
|
2021-07-20 16:51:57 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getXhpcRateTimeType" resultType="map">
|
2021-08-05 17:30:26 +08:00
|
|
|
select ra.power_fee as powerFee,
|
|
|
|
|
ra.service_fee as serviceFee
|
2021-07-20 16:51:57 +08:00
|
|
|
from xhpc_rate as ra
|
2021-08-05 17:30:26 +08:00
|
|
|
where ra.charging_station_id = #{datchargingStationId}
|
|
|
|
|
and ra.status = 0
|
|
|
|
|
and ra.del_flag = 0
|
|
|
|
|
and ra.rate_id = (select rate_id
|
|
|
|
|
from xhpc_rate_time
|
|
|
|
|
where status = 0 and del_flag = 0 and charging_station_id = #{datchargingStationId}
|
|
|
|
|
LIMIT 1)
|
2021-07-20 16:51:57 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
2021-07-28 18:07:25 +08:00
|
|
|
</mapper>
|