ParkingLotGeoMapper.xml 13.3 KB
<?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.zteits.park.mapper.ParkingLotGeoMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.ParkingLotGeo">
    <id column="geo_id" jdbcType="BIGINT" property="geoId" />
    <result column="lon_id" jdbcType="DECIMAL" property="lonId" />
    <result column="lat_id" jdbcType="DECIMAL" property="latId" />
    <result column="geo_no" jdbcType="CHAR" property="geoNo" />
    <result column="geo_name" jdbcType="VARCHAR" property="geoName" />
    <result column="geo_type" jdbcType="INTEGER" property="geoType" />
    <result column="pl_id" jdbcType="BIGINT" property="plId" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="data_status" jdbcType="INTEGER" property="dataStatus" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="create_op" jdbcType="BIGINT" property="createOp" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
    <result column="modify_op" jdbcType="BIGINT" property="modifyOp" />
    <result column="lon_lat_type" jdbcType="INTEGER" property="lonLatType" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    geo_id, lon_id, lat_id, geo_no, geo_name, geo_type, pl_id, pl_name, pl_no, data_status, 
    create_time, create_op, modify_time, modify_op, lon_lat_type
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.ParkingLotGeoExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from parking_lot_geo
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from parking_lot_geo
    where geo_id = #{geoId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from parking_lot_geo
    where geo_id = #{geoId,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.ParkingLotGeoExample">
    delete from parking_lot_geo
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.ParkingLotGeo">
    insert into parking_lot_geo (geo_id, lon_id, lat_id, 
      geo_no, geo_name, geo_type, 
      pl_id, pl_name, pl_no, 
      data_status, create_time, create_op, 
      modify_time, modify_op, lon_lat_type
      )
    values (#{geoId,jdbcType=BIGINT}, #{lonId,jdbcType=DECIMAL}, #{latId,jdbcType=DECIMAL}, 
      #{geoNo,jdbcType=CHAR}, #{geoName,jdbcType=VARCHAR}, #{geoType,jdbcType=INTEGER}, 
      #{plId,jdbcType=BIGINT}, #{plName,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, 
      #{dataStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createOp,jdbcType=BIGINT}, 
      #{modifyTime,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=BIGINT}, #{lonLatType,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.ParkingLotGeo">
    insert into parking_lot_geo
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="geoId != null">
        geo_id,
      </if>
      <if test="lonId != null">
        lon_id,
      </if>
      <if test="latId != null">
        lat_id,
      </if>
      <if test="geoNo != null">
        geo_no,
      </if>
      <if test="geoName != null">
        geo_name,
      </if>
      <if test="geoType != null">
        geo_type,
      </if>
      <if test="plId != null">
        pl_id,
      </if>
      <if test="plName != null">
        pl_name,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="dataStatus != null">
        data_status,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </if>
      <if test="modifyOp != null">
        modify_op,
      </if>
      <if test="lonLatType != null">
        lon_lat_type,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="geoId != null">
        #{geoId,jdbcType=BIGINT},
      </if>
      <if test="lonId != null">
        #{lonId,jdbcType=DECIMAL},
      </if>
      <if test="latId != null">
        #{latId,jdbcType=DECIMAL},
      </if>
      <if test="geoNo != null">
        #{geoNo,jdbcType=CHAR},
      </if>
      <if test="geoName != null">
        #{geoName,jdbcType=VARCHAR},
      </if>
      <if test="geoType != null">
        #{geoType,jdbcType=INTEGER},
      </if>
      <if test="plId != null">
        #{plId,jdbcType=BIGINT},
      </if>
      <if test="plName != null">
        #{plName,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="dataStatus != null">
        #{dataStatus,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="lonLatType != null">
        #{lonLatType,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.ParkingLotGeoExample" resultType="java.lang.Long">
    select count(*) from parking_lot_geo
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update parking_lot_geo
    <set>
      <if test="record.geoId != null">
        geo_id = #{record.geoId,jdbcType=BIGINT},
      </if>
      <if test="record.lonId != null">
        lon_id = #{record.lonId,jdbcType=DECIMAL},
      </if>
      <if test="record.latId != null">
        lat_id = #{record.latId,jdbcType=DECIMAL},
      </if>
      <if test="record.geoNo != null">
        geo_no = #{record.geoNo,jdbcType=CHAR},
      </if>
      <if test="record.geoName != null">
        geo_name = #{record.geoName,jdbcType=VARCHAR},
      </if>
      <if test="record.geoType != null">
        geo_type = #{record.geoType,jdbcType=INTEGER},
      </if>
      <if test="record.plId != null">
        pl_id = #{record.plId,jdbcType=BIGINT},
      </if>
      <if test="record.plName != null">
        pl_name = #{record.plName,jdbcType=VARCHAR},
      </if>
      <if test="record.plNo != null">
        pl_no = #{record.plNo,jdbcType=VARCHAR},
      </if>
      <if test="record.dataStatus != null">
        data_status = #{record.dataStatus,jdbcType=INTEGER},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createOp != null">
        create_op = #{record.createOp,jdbcType=BIGINT},
      </if>
      <if test="record.modifyTime != null">
        modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyOp != null">
        modify_op = #{record.modifyOp,jdbcType=BIGINT},
      </if>
      <if test="record.lonLatType != null">
        lon_lat_type = #{record.lonLatType,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update parking_lot_geo
    set geo_id = #{record.geoId,jdbcType=BIGINT},
      lon_id = #{record.lonId,jdbcType=DECIMAL},
      lat_id = #{record.latId,jdbcType=DECIMAL},
      geo_no = #{record.geoNo,jdbcType=CHAR},
      geo_name = #{record.geoName,jdbcType=VARCHAR},
      geo_type = #{record.geoType,jdbcType=INTEGER},
      pl_id = #{record.plId,jdbcType=BIGINT},
      pl_name = #{record.plName,jdbcType=VARCHAR},
      pl_no = #{record.plNo,jdbcType=VARCHAR},
      data_status = #{record.dataStatus,jdbcType=INTEGER},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      create_op = #{record.createOp,jdbcType=BIGINT},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{record.modifyOp,jdbcType=BIGINT},
      lon_lat_type = #{record.lonLatType,jdbcType=INTEGER}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.ParkingLotGeo">
    update parking_lot_geo
    <set>
      <if test="lonId != null">
        lon_id = #{lonId,jdbcType=DECIMAL},
      </if>
      <if test="latId != null">
        lat_id = #{latId,jdbcType=DECIMAL},
      </if>
      <if test="geoNo != null">
        geo_no = #{geoNo,jdbcType=CHAR},
      </if>
      <if test="geoName != null">
        geo_name = #{geoName,jdbcType=VARCHAR},
      </if>
      <if test="geoType != null">
        geo_type = #{geoType,jdbcType=INTEGER},
      </if>
      <if test="plId != null">
        pl_id = #{plId,jdbcType=BIGINT},
      </if>
      <if test="plName != null">
        pl_name = #{plName,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="dataStatus != null">
        data_status = #{dataStatus,jdbcType=INTEGER},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=BIGINT},
      </if>
      <if test="lonLatType != null">
        lon_lat_type = #{lonLatType,jdbcType=INTEGER},
      </if>
    </set>
    where geo_id = #{geoId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.ParkingLotGeo">
    update parking_lot_geo
    set lon_id = #{lonId,jdbcType=DECIMAL},
      lat_id = #{latId,jdbcType=DECIMAL},
      geo_no = #{geoNo,jdbcType=CHAR},
      geo_name = #{geoName,jdbcType=VARCHAR},
      geo_type = #{geoType,jdbcType=INTEGER},
      pl_id = #{plId,jdbcType=BIGINT},
      pl_name = #{plName,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      data_status = #{dataStatus,jdbcType=INTEGER},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      create_op = #{createOp,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=BIGINT},
      lon_lat_type = #{lonLatType,jdbcType=INTEGER}
    where geo_id = #{geoId,jdbcType=BIGINT}
  </update>
  
</mapper>