<?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.chinaitop.depot.intelligent.basicdata.mapper.TStationMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="VARCHAR" />
    <result column="sitename" property="sitename" jdbcType="VARCHAR" />
    <result column="sitecode" property="sitecode" jdbcType="VARCHAR" />
    <result column="address" property="address" jdbcType="VARCHAR" />
    <result column="brand" property="brand" jdbcType="VARCHAR" />
    <result column="model" property="model" jdbcType="VARCHAR" />
    <result column="signaltype" property="signaltype" jdbcType="VARCHAR" />
    <result column="serviceip" property="serviceip" jdbcType="VARCHAR" />
    <result column="serviceport" property="serviceport" jdbcType="INTEGER" />
    <result column="stringslogan" property="stringslogan" jdbcType="INTEGER" />
    <result column="porterrate" property="porterrate" jdbcType="VARCHAR" />
    <result column="databit" property="databit" jdbcType="VARCHAR" />
    <result column="checkbit" property="checkbit" jdbcType="VARCHAR" />
    <result column="islocal" property="islocal" jdbcType="INTEGER" />
    <result column="isline" property="isline" jdbcType="INTEGER" />
    <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
    <result column="v_zd_type" property="vZdType" jdbcType="VARCHAR" />
    <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    id, org_id, sitename, sitecode, address, brand, model, signaltype, serviceip, serviceport, 
    stringslogan, porterrate, databit, checkbit, islocal, isline, updatetime, remark, 
    v_cf_code, v_zd_type, del_flag
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStationExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_station
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from t_station
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from t_station
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStationExample" >
    delete from t_station
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
    insert into t_station (id, org_id, sitename, 
      sitecode, address, brand, 
      model, signaltype, serviceip, 
      serviceport, stringslogan, porterrate, 
      databit, checkbit, islocal, 
      isline, updatetime, remark, 
      v_cf_code, v_zd_type, del_flag
      )
    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{sitename,jdbcType=VARCHAR}, 
      #{sitecode,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR}, 
      #{model,jdbcType=VARCHAR}, #{signaltype,jdbcType=VARCHAR}, #{serviceip,jdbcType=VARCHAR}, 
      #{serviceport,jdbcType=INTEGER}, #{stringslogan,jdbcType=INTEGER}, #{porterrate,jdbcType=VARCHAR}, 
      #{databit,jdbcType=VARCHAR}, #{checkbit,jdbcType=VARCHAR}, #{islocal,jdbcType=INTEGER}, 
      #{isline,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, 
      #{vCfCode,jdbcType=VARCHAR}, #{vZdType,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
    insert into t_station
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="sitename != null" >
        sitename,
      </if>
      <if test="sitecode != null" >
        sitecode,
      </if>
      <if test="address != null" >
        address,
      </if>
      <if test="brand != null" >
        brand,
      </if>
      <if test="model != null" >
        model,
      </if>
      <if test="signaltype != null" >
        signaltype,
      </if>
      <if test="serviceip != null" >
        serviceip,
      </if>
      <if test="serviceport != null" >
        serviceport,
      </if>
      <if test="stringslogan != null" >
        stringslogan,
      </if>
      <if test="porterrate != null" >
        porterrate,
      </if>
      <if test="databit != null" >
        databit,
      </if>
      <if test="checkbit != null" >
        checkbit,
      </if>
      <if test="islocal != null" >
        islocal,
      </if>
      <if test="isline != null" >
        isline,
      </if>
      <if test="updatetime != null" >
        updatetime,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="vCfCode != null" >
        v_cf_code,
      </if>
      <if test="vZdType != null" >
        v_zd_type,
      </if>
      <if test="delFlag != null" >
        del_flag,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="sitename != null" >
        #{sitename,jdbcType=VARCHAR},
      </if>
      <if test="sitecode != null" >
        #{sitecode,jdbcType=VARCHAR},
      </if>
      <if test="address != null" >
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="brand != null" >
        #{brand,jdbcType=VARCHAR},
      </if>
      <if test="model != null" >
        #{model,jdbcType=VARCHAR},
      </if>
      <if test="signaltype != null" >
        #{signaltype,jdbcType=VARCHAR},
      </if>
      <if test="serviceip != null" >
        #{serviceip,jdbcType=VARCHAR},
      </if>
      <if test="serviceport != null" >
        #{serviceport,jdbcType=INTEGER},
      </if>
      <if test="stringslogan != null" >
        #{stringslogan,jdbcType=INTEGER},
      </if>
      <if test="porterrate != null" >
        #{porterrate,jdbcType=VARCHAR},
      </if>
      <if test="databit != null" >
        #{databit,jdbcType=VARCHAR},
      </if>
      <if test="checkbit != null" >
        #{checkbit,jdbcType=VARCHAR},
      </if>
      <if test="islocal != null" >
        #{islocal,jdbcType=INTEGER},
      </if>
      <if test="isline != null" >
        #{isline,jdbcType=INTEGER},
      </if>
      <if test="updatetime != null" >
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vZdType != null" >
        #{vZdType,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null" >
        #{delFlag,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStationExample" resultType="java.lang.Integer" >
    select count(*) from t_station
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update t_station
    <set >
      <if test="record.id != null" >
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null" >
        org_id = #{record.orgId,jdbcType=VARCHAR},
      </if>
      <if test="record.sitename != null" >
        sitename = #{record.sitename,jdbcType=VARCHAR},
      </if>
      <if test="record.sitecode != null" >
        sitecode = #{record.sitecode,jdbcType=VARCHAR},
      </if>
      <if test="record.address != null" >
        address = #{record.address,jdbcType=VARCHAR},
      </if>
      <if test="record.brand != null" >
        brand = #{record.brand,jdbcType=VARCHAR},
      </if>
      <if test="record.model != null" >
        model = #{record.model,jdbcType=VARCHAR},
      </if>
      <if test="record.signaltype != null" >
        signaltype = #{record.signaltype,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceip != null" >
        serviceip = #{record.serviceip,jdbcType=VARCHAR},
      </if>
      <if test="record.serviceport != null" >
        serviceport = #{record.serviceport,jdbcType=INTEGER},
      </if>
      <if test="record.stringslogan != null" >
        stringslogan = #{record.stringslogan,jdbcType=INTEGER},
      </if>
      <if test="record.porterrate != null" >
        porterrate = #{record.porterrate,jdbcType=VARCHAR},
      </if>
      <if test="record.databit != null" >
        databit = #{record.databit,jdbcType=VARCHAR},
      </if>
      <if test="record.checkbit != null" >
        checkbit = #{record.checkbit,jdbcType=VARCHAR},
      </if>
      <if test="record.islocal != null" >
        islocal = #{record.islocal,jdbcType=INTEGER},
      </if>
      <if test="record.isline != null" >
        isline = #{record.isline,jdbcType=INTEGER},
      </if>
      <if test="record.updatetime != null" >
        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.remark != null" >
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.vCfCode != null" >
        v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vZdType != null" >
        v_zd_type = #{record.vZdType,jdbcType=VARCHAR},
      </if>
      <if test="record.delFlag != null" >
        del_flag = #{record.delFlag,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update t_station
    set id = #{record.id,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=VARCHAR},
      sitename = #{record.sitename,jdbcType=VARCHAR},
      sitecode = #{record.sitecode,jdbcType=VARCHAR},
      address = #{record.address,jdbcType=VARCHAR},
      brand = #{record.brand,jdbcType=VARCHAR},
      model = #{record.model,jdbcType=VARCHAR},
      signaltype = #{record.signaltype,jdbcType=VARCHAR},
      serviceip = #{record.serviceip,jdbcType=VARCHAR},
      serviceport = #{record.serviceport,jdbcType=INTEGER},
      stringslogan = #{record.stringslogan,jdbcType=INTEGER},
      porterrate = #{record.porterrate,jdbcType=VARCHAR},
      databit = #{record.databit,jdbcType=VARCHAR},
      checkbit = #{record.checkbit,jdbcType=VARCHAR},
      islocal = #{record.islocal,jdbcType=INTEGER},
      isline = #{record.isline,jdbcType=INTEGER},
      updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
      remark = #{record.remark,jdbcType=VARCHAR},
      v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      v_zd_type = #{record.vZdType,jdbcType=VARCHAR},
      del_flag = #{record.delFlag,jdbcType=INTEGER}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
    update t_station
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="sitename != null" >
        sitename = #{sitename,jdbcType=VARCHAR},
      </if>
      <if test="sitecode != null" >
        sitecode = #{sitecode,jdbcType=VARCHAR},
      </if>
      <if test="address != null" >
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="brand != null" >
        brand = #{brand,jdbcType=VARCHAR},
      </if>
      <if test="model != null" >
        model = #{model,jdbcType=VARCHAR},
      </if>
      <if test="signaltype != null" >
        signaltype = #{signaltype,jdbcType=VARCHAR},
      </if>
      <if test="serviceip != null" >
        serviceip = #{serviceip,jdbcType=VARCHAR},
      </if>
      <if test="serviceport != null" >
        serviceport = #{serviceport,jdbcType=INTEGER},
      </if>
      <if test="stringslogan != null" >
        stringslogan = #{stringslogan,jdbcType=INTEGER},
      </if>
      <if test="porterrate != null" >
        porterrate = #{porterrate,jdbcType=VARCHAR},
      </if>
      <if test="databit != null" >
        databit = #{databit,jdbcType=VARCHAR},
      </if>
      <if test="checkbit != null" >
        checkbit = #{checkbit,jdbcType=VARCHAR},
      </if>
      <if test="islocal != null" >
        islocal = #{islocal,jdbcType=INTEGER},
      </if>
      <if test="isline != null" >
        isline = #{isline,jdbcType=INTEGER},
      </if>
      <if test="updatetime != null" >
        updatetime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="vCfCode != null" >
        v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vZdType != null" >
        v_zd_type = #{vZdType,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null" >
        del_flag = #{delFlag,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TStation" >
    update t_station
    set org_id = #{orgId,jdbcType=VARCHAR},
      sitename = #{sitename,jdbcType=VARCHAR},
      sitecode = #{sitecode,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      brand = #{brand,jdbcType=VARCHAR},
      model = #{model,jdbcType=VARCHAR},
      signaltype = #{signaltype,jdbcType=VARCHAR},
      serviceip = #{serviceip,jdbcType=VARCHAR},
      serviceport = #{serviceport,jdbcType=INTEGER},
      stringslogan = #{stringslogan,jdbcType=INTEGER},
      porterrate = #{porterrate,jdbcType=VARCHAR},
      databit = #{databit,jdbcType=VARCHAR},
      checkbit = #{checkbit,jdbcType=VARCHAR},
      islocal = #{islocal,jdbcType=INTEGER},
      isline = #{isline,jdbcType=INTEGER},
      updatetime = #{updatetime,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR},
      v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      v_zd_type = #{vZdType,jdbcType=VARCHAR},
      del_flag = #{delFlag,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>