2021-07-27 18:09:18 +08:00
|
|
|
<?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.charging.station.mapper.XhpcChargingPileMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.xhpc.charging.station.domain.XhpcChargingPile">
|
|
|
|
|
<result property="chargingPileId" column="charging_pile_id" />
|
|
|
|
|
<result property="chargingStationId" column="charging_station_id" />
|
|
|
|
|
<result property="name" column="name" />
|
|
|
|
|
<result property="nationalStandard" column="national_standard" />
|
|
|
|
|
<result property="power" column="power" />
|
|
|
|
|
<result property="auxiliaryPowerSupply" column="auxiliary_power_supply" />
|
|
|
|
|
<result property="inputVoltage" column="input_voltage" />
|
|
|
|
|
<result property="maxVoltage" column="max_voltage" />
|
|
|
|
|
<result property="minVoltage" column="min_voltage" />
|
|
|
|
|
<result property="maxElectricCurrent" column="max_electric_current" />
|
|
|
|
|
<result property="minElectriCurrent" column="min_electric_current" />
|
|
|
|
|
<result property="serialNumber" column="serial_number" />
|
|
|
|
|
<result property="type" column="type" />
|
|
|
|
|
<result property="programVersion" column="program_version" />
|
|
|
|
|
<result property="networkLinkType" column="network_link_type" />
|
|
|
|
|
<result property="gunNumber" column="gun_number" />
|
|
|
|
|
<result property="communicationProtocolVersion" column="communication_protocol_version" />
|
|
|
|
|
<result property="communicationOperator" column="communication_operator" />
|
|
|
|
|
<result property="simCard" column="sim_card" />
|
|
|
|
|
<result property="rateModelId" column="rate_model_id" />
|
|
|
|
|
<result property="chargingPileNumber" column="charging_pile_number" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
</resultMap>
|
2021-07-27 18:29:50 +08:00
|
|
|
<sql id="selectXhpcChargingPileVo">
|
|
|
|
|
select charging_pile_id, charging_station_id, name, national_standard, power, auxiliary_power_supply, input_voltage, max_voltage, min_voltage, max_electric_current, min_electric_current, serial_number, type, program_version, network_link_type, gun_number,communication_protocol_version,communication_operator,sim_card,rate_model_id,charging_pile_number,status, del_flag, create_time, create_by, update_time, update_by, remark, rate_model_id from xhpc_charging_pile
|
|
|
|
|
</sql>
|
2021-07-27 18:09:18 +08:00
|
|
|
<select id="selectXhpcChargingStationList" resultType="map">
|
|
|
|
|
select
|
|
|
|
|
cp.charging_pile_id as chargingPileId,
|
|
|
|
|
cp.charging_station_id as chargingStationId,
|
|
|
|
|
st.name as chargingStationName,
|
|
|
|
|
cp.serial_number as serialNumber,
|
|
|
|
|
cp.type as type,
|
|
|
|
|
cp.power as power,
|
|
|
|
|
cp.gun_number as gunNumber,
|
|
|
|
|
cp.status as status
|
|
|
|
|
from xhpc_charging_pile as cp
|
|
|
|
|
left join xhpc_charging_station as st on st.charging_station_id =cp.charging_station_id
|
|
|
|
|
where cp.del_flag =0
|
|
|
|
|
<if test="name !=null and name !=''">
|
|
|
|
|
and cp.name like CONCAT('%',#{name},'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="type !=null and type !=''">
|
|
|
|
|
and cp.type=#{type}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="serialNumber !=null and serialNumber!=''">
|
|
|
|
|
and cp.serial_number=#{serialNumber}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="chargingStationId !=null and chargingStationId!=''">
|
|
|
|
|
and cp.charging_station_id=#{chargingStationId}
|
|
|
|
|
</if>
|
|
|
|
|
order by cp.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="addXhpcChargingPile" parameterType="com.xhpc.charging.station.domain.XhpcChargingPile" useGeneratedKeys="true" keyProperty="chargingPileId">
|
|
|
|
|
insert into xhpc_charging_pile
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="null != chargingStationId ">
|
|
|
|
|
charging_station_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != name ">
|
|
|
|
|
name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != nationalStandard ">
|
|
|
|
|
national_standard,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != power ">
|
|
|
|
|
power,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != auxiliaryPowerSupply ">
|
|
|
|
|
auxiliary_power_supply,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != inputVoltage ">
|
|
|
|
|
input_voltage,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != maxVoltage ">
|
|
|
|
|
max_voltage,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != minVoltage ">
|
|
|
|
|
min_voltage,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != maxElectricCurrent ">
|
|
|
|
|
max_electric_current,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != minElectriCurrent ">
|
|
|
|
|
min_electric_current,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != serialNumber ">
|
|
|
|
|
serial_number,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != type ">
|
|
|
|
|
type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != programVersion ">
|
|
|
|
|
program_version,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != networkLinkType ">
|
|
|
|
|
network_link_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != gunNumber ">
|
|
|
|
|
gun_number,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != communicationProtocolVersion ">
|
|
|
|
|
communication_protocol_version,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != communicationOperator ">
|
|
|
|
|
communication_operator,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != simCard ">
|
|
|
|
|
sim_card,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != rateModelId ">
|
|
|
|
|
rate_model_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != chargingPileNumber ">
|
|
|
|
|
charging_pile_number,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != status ">
|
|
|
|
|
status,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != delFlag ">
|
|
|
|
|
del_flag,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != createTime ">
|
|
|
|
|
create_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != createBy and '' != createBy">
|
|
|
|
|
create_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != updateTime ">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != updateBy and '' != updateBy">
|
|
|
|
|
update_by,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != remark and '' != remark">
|
|
|
|
|
remark
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="null != chargingStationId ">
|
|
|
|
|
#{chargingStationId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != name ">
|
|
|
|
|
#{name},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != nationalStandard ">
|
|
|
|
|
#{nationalStandard},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != power ">
|
|
|
|
|
#{power},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != auxiliaryPowerSupply ">
|
|
|
|
|
#{auxiliaryPowerSupply},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != inputVoltage ">
|
|
|
|
|
#{inputVoltage},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != maxVoltage ">
|
|
|
|
|
#{maxVoltage},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != minVoltage ">
|
|
|
|
|
#{minVoltage},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != maxElectricCurrent ">
|
|
|
|
|
#{maxElectricCurrent},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != minElectriCurrent ">
|
|
|
|
|
#{minElectriCurrent},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != serialNumber ">
|
|
|
|
|
#{serialNumber},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != type ">
|
|
|
|
|
#{type},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != programVersion ">
|
|
|
|
|
#{programVersion},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != networkLinkType ">
|
|
|
|
|
#{networkLinkType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != gunNumber ">
|
|
|
|
|
#{gunNumber},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != communicationProtocolVersion ">
|
|
|
|
|
#{communicationProtocolVersion},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != communicationOperator ">
|
|
|
|
|
#{communicationOperator},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != simCard ">
|
|
|
|
|
#{simCard},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != rateModelId ">
|
|
|
|
|
#{rateModelId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != chargingPileNumber ">
|
|
|
|
|
#{chargingPileNumber},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != status ">
|
|
|
|
|
#{status},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != delFlag ">
|
|
|
|
|
#{delFlag},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != createTime ">
|
|
|
|
|
#{createTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != createBy and '' != createBy">
|
|
|
|
|
#{createBy},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != updateTime ">
|
|
|
|
|
#{updateTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != updateBy and '' != updateBy">
|
|
|
|
|
#{updateBy},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="null != remark and '' != remark">
|
|
|
|
|
#{remark}
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<select id="selectXhpcChargingStationById" resultType="map">
|
|
|
|
|
select
|
|
|
|
|
charging_station_id as chargingStationId,
|
|
|
|
|
rate_model_id as rateModelId
|
|
|
|
|
from xhpc_charging_station where charging_station_id=#{chargingStationId}
|
|
|
|
|
</select>
|
2021-07-27 18:29:50 +08:00
|
|
|
|
|
|
|
|
<select id="selectXhpcChargingPileById" resultMap="BaseResultMap">
|
|
|
|
|
<include refid="selectXhpcChargingPileVo"/>
|
|
|
|
|
where charging_pile_id = #{chargingPileId}
|
|
|
|
|
</select>
|
2021-07-27 18:09:18 +08:00
|
|
|
</mapper>
|