<?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.invoice.mapper.XhpcChargingStationMapper">

    <resultMap id="BaseResultMap" type="com.xhpc.common.domain.XhpcChargingStation">
        <result property="chargingStationId" column="charging_station_id"/>
        <result property="name" column="name"/>
        <result property="operatorId" column="operator_id"/>
        <result property="type" column="type"/>
        <result property="stationType" column="station_type"/>
        <result property="constructionSite" column="construction_site"/>
        <result property="serviceFacilities" column="service_facilities"/>
        <result property="peripheryFacilities" column="periphery_facilities"/>
        <result property="areaCode" column="area_code"/>
        <result property="address" column="address"/>
        <result property="detailedAddress" column="detailed_address"/>
        <result property="longitude" column="longitude"/>
        <result property="latitude" column="latitude"/>
        <result property="parkingInstructions" column="parking_instructions"/>
        <result property="serialNumber" column="serial_number"/>
        <result property="clientVisible" column="client_visible"/>
        <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"/>
        <result property="rateModelId" column="rate_model_id"/>
        <result property="imgId" column="img_id"/>
        <result property="businessInstructions" column="business_instructions"/>
        <result property="reminderInstructions" column="reminder_instructions"/>
        <result property="serviceTel" column="service_tel"/>
        <result property="parkNums" column="park_nums"/>
    </resultMap>

    <sql id="selectXhpcChargingStationVo">
        select charging_station_id,
               name,
               operator_id,
               type,
               construction_site,
               service_facilities,
               periphery_facilities,
               area_code,
               address,
               detailed_address,
               longitude,
               latitude,
               parking_instructions,
               serial_number,
               client_visible,
               status,
               del_flag,
               create_time,
               create_by,
               update_time,
               update_by,
               remark,
               rate_model_id
        from xhpc_charging_station
    </sql>

    <select id="selectXhpcChargingStationById" resultMap="BaseResultMap">
        <include refid="selectXhpcChargingStationVo"/>
        where charging_station_id = #{chargingStationId}
    </select>

</mapper>
