<?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.steerinfo.baseinfo.meterbaseloadpoint.mapper.MeterBaseLoadPointMapper">
  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaseloadpoint.model.MeterBaseLoadPoint">
    <id column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
    <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
    <result column="LONGITUDE" jdbcType="VARCHAR" property="longitude" />
    <result column="LATITUDE" jdbcType="VARCHAR" property="latitude" />
    <result column="RADIUS" jdbcType="VARCHAR" property="radius" />
    <result column="LONGITUDE_SPACE" jdbcType="VARCHAR" property="longitudeSpace" />
    <result column="LATITUDE_SPACE" jdbcType="VARCHAR" property="latitudeSpace" />
    <result column="USE_TYPE" jdbcType="VARCHAR" property="useType" />
    <result column="VALID_FLAG" jdbcType="VARCHAR" property="validFlag" />
    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="DELETE_MAN_NO" jdbcType="VARCHAR" property="deleteManNo" />
    <result column="DELETE_MAN_NAME" jdbcType="VARCHAR" property="deleteManName" />
    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
    <result column="INDEX_CODE" jdbcType="VARCHAR" property="indexCode" />
    <result column="METER_CODE" jdbcType="VARCHAR" property="meterCode" />
  </resultMap>
  <sql id="columns">
    LOAD_POINT_NO, LOAD_POINT_NAME, LONGITUDE, LATITUDE, RADIUS, LONGITUDE_SPACE, LATITUDE_SPACE, 
    USE_TYPE, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
    UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, INDEX_CODE, 
    METER_CODE
  </sql>
  <sql id="columns_alias">
    t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.LONGITUDE, t.LATITUDE, t.RADIUS, t.LONGITUDE_SPACE, 
    t.LATITUDE_SPACE, t.USE_TYPE, t.VALID_FLAG, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, 
    t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, 
    t.DELETE_TIME, t.INDEX_CODE, t.METER_CODE
  </sql>
  <sql id="select">
    SELECT <include refid="columns"/> FROM METER_BASE_LOAD_POINT
  </sql>
  <sql id="select_alias">
    SELECT <include refid="columns_alias"/> FROM METER_BASE_LOAD_POINT t
  </sql>
  <sql id="where">
    <where>
      <if test="loadPointNo != null and loadPointNo != ''">
        and LOAD_POINT_NO = #{loadPointNo}
      </if>
      <if test="loadPointName != null and loadPointName != ''">
        and LOAD_POINT_NAME = #{loadPointName}
      </if>
      <if test="longitude != null and longitude != ''">
        and LONGITUDE = #{longitude}
      </if>
      <if test="latitude != null and latitude != ''">
        and LATITUDE = #{latitude}
      </if>
      <if test="radius != null and radius != ''">
        and RADIUS = #{radius}
      </if>
      <if test="longitudeSpace != null and longitudeSpace != ''">
        and LONGITUDE_SPACE = #{longitudeSpace}
      </if>
      <if test="latitudeSpace != null and latitudeSpace != ''">
        and LATITUDE_SPACE = #{latitudeSpace}
      </if>
      <if test="useType != null and useType != ''">
        and USE_TYPE = #{useType}
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG = #{validFlag}
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO = #{createManNo}
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME = #{createManName}
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO = #{updateManNo}
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME = #{updateManName}
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="indexCode != null and indexCode != ''">
        and INDEX_CODE = #{indexCode}
      </if>
      <if test="meterCode != null and meterCode != ''">
        and METER_CODE = #{meterCode}
      </if>
    </where>
  </sql>
  <sql id="whereLike">
    <where>
      <if test="loadPointNo != null and loadPointNo != ''">
        and LOAD_POINT_NO LIKE '%${loadPointNo}%'
      </if>
      <if test="loadPointName != null and loadPointName != ''">
        and LOAD_POINT_NAME LIKE '%${loadPointName}%'
      </if>
      <if test="longitude != null and longitude != ''">
        and LONGITUDE LIKE '%${longitude}%'
      </if>
      <if test="latitude != null and latitude != ''">
        and LATITUDE LIKE '%${latitude}%'
      </if>
      <if test="radius != null and radius != ''">
        and RADIUS LIKE '%${radius}%'
      </if>
      <if test="longitudeSpace != null and longitudeSpace != ''">
        and LONGITUDE_SPACE LIKE '%${longitudeSpace}%'
      </if>
      <if test="latitudeSpace != null and latitudeSpace != ''">
        and LATITUDE_SPACE LIKE '%${latitudeSpace}%'
      </if>
      <if test="useType != null and useType != ''">
        and USE_TYPE LIKE '%${useType}%'
      </if>
      <if test="validFlag != null and validFlag != ''">
        and VALID_FLAG LIKE '%${validFlag}%'
      </if>
      <if test="createManNo != null and createManNo != ''">
        and CREATE_MAN_NO LIKE '%${createManNo}%'
      </if>
      <if test="createManName != null and createManName != ''">
        and CREATE_MAN_NAME LIKE '%${createManName}%'
      </if>
      <if test="createTime != null">
        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
      </if>
      <if test="updateManName != null and updateManName != ''">
        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
      </if>
      <if test="updateTime != null">
        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
      </if>
      <if test="deleteManNo != null and deleteManNo != ''">
        and DELETE_MAN_NO LIKE '%${deleteManNo}%'
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        and DELETE_MAN_NAME LIKE '%${deleteManName}%'
      </if>
      <if test="deleteTime != null">
        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
      </if>
      <if test="indexCode != null and indexCode != ''">
        and INDEX_CODE LIKE '%${indexCode}%'
      </if>
      <if test="meterCode != null and meterCode != ''">
        and METER_CODE LIKE '%${meterCode}%'
      </if>
    </where>
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from METER_BASE_LOAD_POINT
    where LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
    delete from METER_BASE_LOAD_POINT
    where 1!=1 
      <if test="loadPointName != null and loadPointName != ''">
        or LOAD_POINT_NAME = #{loadPointName}
      </if>
      <if test="longitude != null and longitude != ''">
        or LONGITUDE = #{longitude}
      </if>
      <if test="latitude != null and latitude != ''">
        or LATITUDE = #{latitude}
      </if>
      <if test="radius != null and radius != ''">
        or RADIUS = #{radius}
      </if>
      <if test="longitudeSpace != null and longitudeSpace != ''">
        or LONGITUDE_SPACE = #{longitudeSpace}
      </if>
      <if test="latitudeSpace != null and latitudeSpace != ''">
        or LATITUDE_SPACE = #{latitudeSpace}
      </if>
      <if test="useType != null and useType != ''">
        or USE_TYPE = #{useType}
      </if>
      <if test="validFlag != null and validFlag != ''">
        or VALID_FLAG = #{validFlag}
      </if>
      <if test="createManNo != null and createManNo != ''">
        or CREATE_MAN_NO = #{createManNo}
      </if>
      <if test="createManName != null and createManName != ''">
        or CREATE_MAN_NAME = #{createManName}
      </if>
      <if test="createTime != null">
        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
      </if>
      <if test="updateManNo != null and updateManNo != ''">
        or UPDATE_MAN_NO = #{updateManNo}
      </if>
      <if test="updateManName != null and updateManName != ''">
        or UPDATE_MAN_NAME = #{updateManName}
      </if>
      <if test="updateTime != null">
        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
      </if>
      <if test="deleteManNo != null and deleteManNo != ''">
        or DELETE_MAN_NO = #{deleteManNo}
      </if>
      <if test="deleteManName != null and deleteManName != ''">
        or DELETE_MAN_NAME = #{deleteManName}
      </if>
      <if test="deleteTime != null">
        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
      </if>
      <if test="indexCode != null and indexCode != ''">
        or INDEX_CODE = #{indexCode}
      </if>
      <if test="meterCode != null and meterCode != ''">
        or METER_CODE = #{meterCode}
      </if>
  </delete>
  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaseloadpoint.model.MeterBaseLoadPoint">
    insert into METER_BASE_LOAD_POINT (LOAD_POINT_NO, LOAD_POINT_NAME, LONGITUDE, 
      LATITUDE, RADIUS, LONGITUDE_SPACE, 
      LATITUDE_SPACE, USE_TYPE, VALID_FLAG, 
      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
      INDEX_CODE, METER_CODE)
    values (#{loadPointNo,jdbcType=VARCHAR}, #{loadPointName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, 
      #{latitude,jdbcType=VARCHAR}, #{radius,jdbcType=VARCHAR}, #{longitudeSpace,jdbcType=VARCHAR}, 
      #{latitudeSpace,jdbcType=VARCHAR}, #{useType,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}, 
      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{deleteManNo,jdbcType=VARCHAR}, #{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, 
      #{indexCode,jdbcType=VARCHAR}, #{meterCode,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaseloadpoint.model.MeterBaseLoadPoint">
    insert into METER_BASE_LOAD_POINT
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="loadPointNo != null">
        LOAD_POINT_NO,
      </if>
      <if test="loadPointName != null">
        LOAD_POINT_NAME,
      </if>
      <if test="longitude != null">
        LONGITUDE,
      </if>
      <if test="latitude != null">
        LATITUDE,
      </if>
      <if test="radius != null">
        RADIUS,
      </if>
      <if test="longitudeSpace != null">
        LONGITUDE_SPACE,
      </if>
      <if test="latitudeSpace != null">
        LATITUDE_SPACE,
      </if>
      <if test="useType != null">
        USE_TYPE,
      </if>
      <if test="validFlag != null">
        VALID_FLAG,
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO,
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME,
      </if>
      <if test="createTime != null">
        CREATE_TIME,
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO,
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME,
      </if>
      <if test="updateTime != null">
        UPDATE_TIME,
      </if>
      <if test="deleteManNo != null">
        DELETE_MAN_NO,
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME,
      </if>
      <if test="deleteTime != null">
        DELETE_TIME,
      </if>
      <if test="indexCode != null">
        INDEX_CODE,
      </if>
      <if test="meterCode != null">
        METER_CODE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="loadPointNo != null">
        #{loadPointNo,jdbcType=VARCHAR},
      </if>
      <if test="loadPointName != null">
        #{loadPointName,jdbcType=VARCHAR},
      </if>
      <if test="longitude != null">
        #{longitude,jdbcType=VARCHAR},
      </if>
      <if test="latitude != null">
        #{latitude,jdbcType=VARCHAR},
      </if>
      <if test="radius != null">
        #{radius,jdbcType=VARCHAR},
      </if>
      <if test="longitudeSpace != null">
        #{longitudeSpace,jdbcType=VARCHAR},
      </if>
      <if test="latitudeSpace != null">
        #{latitudeSpace,jdbcType=VARCHAR},
      </if>
      <if test="useType != null">
        #{useType,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        #{validFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManNo != null">
        #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteManNo != null">
        #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="indexCode != null">
        #{indexCode,jdbcType=VARCHAR},
      </if>
      <if test="meterCode != null">
        #{meterCode,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaseloadpoint.model.MeterBaseLoadPoint">
    update METER_BASE_LOAD_POINT
    set LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
      LONGITUDE = #{longitude,jdbcType=VARCHAR},
      LATITUDE = #{latitude,jdbcType=VARCHAR},
      RADIUS = #{radius,jdbcType=VARCHAR},
      LONGITUDE_SPACE = #{longitudeSpace,jdbcType=VARCHAR},
      LATITUDE_SPACE = #{latitudeSpace,jdbcType=VARCHAR},
      USE_TYPE = #{useType,jdbcType=VARCHAR},
      VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      INDEX_CODE = #{indexCode,jdbcType=VARCHAR},
      METER_CODE = #{meterCode,jdbcType=VARCHAR}
    where LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaseloadpoint.model.MeterBaseLoadPoint">
    update METER_BASE_LOAD_POINT
    <set>
      <if test="loadPointName != null">
        LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
      </if>
      <if test="longitude != null">
        LONGITUDE = #{longitude,jdbcType=VARCHAR},
      </if>
      <if test="latitude != null">
        LATITUDE = #{latitude,jdbcType=VARCHAR},
      </if>
      <if test="radius != null">
        RADIUS = #{radius,jdbcType=VARCHAR},
      </if>
      <if test="longitudeSpace != null">
        LONGITUDE_SPACE = #{longitudeSpace,jdbcType=VARCHAR},
      </if>
      <if test="latitudeSpace != null">
        LATITUDE_SPACE = #{latitudeSpace,jdbcType=VARCHAR},
      </if>
      <if test="useType != null">
        USE_TYPE = #{useType,jdbcType=VARCHAR},
      </if>
      <if test="validFlag != null">
        VALID_FLAG = #{validFlag,jdbcType=VARCHAR},
      </if>
      <if test="createManNo != null">
        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
      </if>
      <if test="createManName != null">
        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateManNo != null">
        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
      </if>
      <if test="updateManName != null">
        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="deleteManNo != null">
        DELETE_MAN_NO = #{deleteManNo,jdbcType=VARCHAR},
      </if>
      <if test="deleteManName != null">
        DELETE_MAN_NAME = #{deleteManName,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
      </if>
      <if test="indexCode != null">
        INDEX_CODE = #{indexCode,jdbcType=VARCHAR},
      </if>
      <if test="meterCode != null">
        METER_CODE = #{meterCode,jdbcType=VARCHAR},
      </if>
    </set>
    where LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR}
  </update>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <include refid="select"/>
    where LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR}
  </select>
  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="where"/>
    order by LOAD_POINT_NO
  </select>
  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <include refid="whereLike"/>
    order by LOAD_POINT_NO
  </select>
  <insert id="batchInsert" parameterType="java.util.List">
    insert into METER_BASE_LOAD_POINT 
      (LOAD_POINT_NO, 
      LOAD_POINT_NAME, LONGITUDE, LATITUDE, 
      RADIUS, LONGITUDE_SPACE, LATITUDE_SPACE, 
      USE_TYPE, VALID_FLAG, CREATE_MAN_NO, 
      CREATE_MAN_NAME, CREATE_TIME, 
      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
      DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME, 
      INDEX_CODE, METER_CODE)
    ( <foreach collection="list" item="item" separator="union all"> 
   select  
      #{item.loadPointNo,jdbcType=VARCHAR}, 
      #{item.loadPointName,jdbcType=VARCHAR}, #{item.longitude,jdbcType=VARCHAR}, #{item.latitude,jdbcType=VARCHAR}, 
      #{item.radius,jdbcType=VARCHAR}, #{item.longitudeSpace,jdbcType=VARCHAR}, #{item.latitudeSpace,jdbcType=VARCHAR}, 
      #{item.useType,jdbcType=VARCHAR}, #{item.validFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, 
      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
      #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, 
      #{item.indexCode,jdbcType=VARCHAR}, #{item.meterCode,jdbcType=VARCHAR} from dual  
   </foreach> )
  </insert>
  <update id="batchUpdate" parameterType="java.util.List">
     update METER_BASE_LOAD_POINT
     set
       LOAD_POINT_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
       </foreach>
       ,LOAD_POINT_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
       </foreach>
       ,LONGITUDE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.longitude,jdbcType=VARCHAR}
       </foreach>
       ,LATITUDE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.latitude,jdbcType=VARCHAR}
       </foreach>
       ,RADIUS=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.radius,jdbcType=VARCHAR}
       </foreach>
       ,LONGITUDE_SPACE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.longitudeSpace,jdbcType=VARCHAR}
       </foreach>
       ,LATITUDE_SPACE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.latitudeSpace,jdbcType=VARCHAR}
       </foreach>
       ,USE_TYPE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.useType,jdbcType=VARCHAR}
       </foreach>
       ,VALID_FLAG=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.validFlag,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
       </foreach>
       ,CREATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
       </foreach>
       ,UPDATE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
       </foreach>
       ,UPDATE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
       </foreach>
       ,DELETE_MAN_NO=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.deleteManNo,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_MAN_NAME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.deleteManName,jdbcType=VARCHAR}
       </foreach>
       ,DELETE_TIME=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.deleteTime,jdbcType=TIMESTAMP}
       </foreach>
       ,INDEX_CODE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.indexCode,jdbcType=VARCHAR}
       </foreach>
       ,METER_CODE=
       <foreach collection="list" item="item" index="index" separator=" " open="case LOAD_POINT_NO" close="end">
          when #{item.loadPointNo,jdbcType=VARCHAR} then #{item.meterCode,jdbcType=VARCHAR}
       </foreach>
     where LOAD_POINT_NO in 
     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
    #{item.loadPointNo,jdbcType=VARCHAR}
     </foreach> 
  </update>
  <delete id="batchDelete" parameterType="java.util.List">
    delete from METER_BASE_LOAD_POINT
    where LOAD_POINT_NO in 
    <foreach collection="list" item="id" open="(" close=")" separator=",">
      #{id}
    </foreach>
  </delete>
  <!-- 友情提示！！！-->
  <!-- 请将自己写的代码放在此标签之下，方便以后粘贴复制。-->
  <select id="GetNewID" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(LOAD_POINT_NO, LENGTH(LOAD_POINT_NO) - 4))),0) + 1,5,'0') LOAD_POINT_NO
    FROM METER_BASE_LOAD_POINT
  </select>

  <select id="getNewCode" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT LPAD(NVL(MAX(TO_NUMBER(METER_CODE)),0) + 1,3,'0') METER_CODE
    FROM METER_BASE_LOAD_POINT
  </select>

  <select id="selectForUpdate" parameterType="java.util.HashMap" resultMap="BaseResultMap">
    <include refid="select"/>
    <where>
      <if test="loadPointNo != null and loadPointNo != ''">
        and LOAD_POINT_NO != #{loadPointNo}
      </if>
      <if test="loadPointName != null and loadPointName != ''">
        and LOAD_POINT_NAME = #{loadPointName}
      </if>
      <if test="meterCode != null and meterCode != ''">
        and METER_CODE = #{meterCode}
      </if>
    </where>
  </select>
</mapper>