<?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.TJctableMapper" >
  <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TJctable" >
    <id column="id" property="id" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="VARCHAR" />
    <result column="v_jc_name" property="vJcName" jdbcType="VARCHAR" />
    <result column="v_jc_code" property="vJcCode" jdbcType="VARCHAR" />
    <result column="v_ws_src" property="vWsSrc" jdbcType="VARCHAR" />
    <result column="v_vedio_ip" property="vVedioIp" jdbcType="VARCHAR" />
    <result column="i_vedio_port" property="iVedioPort" jdbcType="INTEGER" />
    <result column="v_vedio_user" property="vVedioUser" jdbcType="VARCHAR" />
    <result column="v_vedio_pwd" property="vVedioPwd" jdbcType="VARCHAR" />
    <result column="v_vedio_tdh" property="vVedioTdh" jdbcType="INTEGER" />
    <result column="v_cf_code" property="vCfCode" jdbcType="VARCHAR" />
    <result column="v_jcpp" property="vJcpp" jdbcType="VARCHAR" />
    <result column="update_person" property="updatePerson" jdbcType="VARCHAR" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
    <result column="data_source" property="dataSource" jdbcType="VARCHAR" />
    <result column="v_remark" property="vRemark" 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, v_jc_name, v_jc_code, v_ws_src, v_vedio_ip, i_vedio_port, v_vedio_user, 
    v_vedio_pwd, v_vedio_tdh, v_cf_code, v_jcpp, update_person, update_time, data_source, 
    v_remark, del_flag
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TJctableExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_jctable
    <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_jctable
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from t_jctable
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TJctableExample" >
    delete from t_jctable
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TJctable" >
    insert into t_jctable (id, org_id, v_jc_name, 
      v_jc_code, v_ws_src, v_vedio_ip, 
      i_vedio_port, v_vedio_user, v_vedio_pwd, 
      v_vedio_tdh, v_cf_code, v_jcpp, 
      update_person, update_time, data_source, 
      v_remark, del_flag)
    values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vJcName,jdbcType=VARCHAR}, 
      #{vJcCode,jdbcType=VARCHAR}, #{vWsSrc,jdbcType=VARCHAR}, #{vVedioIp,jdbcType=VARCHAR}, 
      #{iVedioPort,jdbcType=INTEGER}, #{vVedioUser,jdbcType=VARCHAR}, #{vVedioPwd,jdbcType=VARCHAR}, 
      #{vVedioTdh,jdbcType=INTEGER}, #{vCfCode,jdbcType=VARCHAR}, #{vJcpp,jdbcType=VARCHAR}, 
      #{updatePerson,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{dataSource,jdbcType=VARCHAR}, 
      #{vRemark,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TJctable" >
    insert into t_jctable
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="vJcName != null" >
        v_jc_name,
      </if>
      <if test="vJcCode != null" >
        v_jc_code,
      </if>
      <if test="vWsSrc != null" >
        v_ws_src,
      </if>
      <if test="vVedioIp != null" >
        v_vedio_ip,
      </if>
      <if test="iVedioPort != null" >
        i_vedio_port,
      </if>
      <if test="vVedioUser != null" >
        v_vedio_user,
      </if>
      <if test="vVedioPwd != null" >
        v_vedio_pwd,
      </if>
      <if test="vVedioTdh != null" >
        v_vedio_tdh,
      </if>
      <if test="vCfCode != null" >
        v_cf_code,
      </if>
      <if test="vJcpp != null" >
        v_jcpp,
      </if>
      <if test="updatePerson != null" >
        update_person,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
      <if test="dataSource != null" >
        data_source,
      </if>
      <if test="vRemark != null" >
        v_remark,
      </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="vJcName != null" >
        #{vJcName,jdbcType=VARCHAR},
      </if>
      <if test="vJcCode != null" >
        #{vJcCode,jdbcType=VARCHAR},
      </if>
      <if test="vWsSrc != null" >
        #{vWsSrc,jdbcType=VARCHAR},
      </if>
      <if test="vVedioIp != null" >
        #{vVedioIp,jdbcType=VARCHAR},
      </if>
      <if test="iVedioPort != null" >
        #{iVedioPort,jdbcType=INTEGER},
      </if>
      <if test="vVedioUser != null" >
        #{vVedioUser,jdbcType=VARCHAR},
      </if>
      <if test="vVedioPwd != null" >
        #{vVedioPwd,jdbcType=VARCHAR},
      </if>
      <if test="vVedioTdh != null" >
        #{vVedioTdh,jdbcType=INTEGER},
      </if>
      <if test="vCfCode != null" >
        #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vJcpp != null" >
        #{vJcpp,jdbcType=VARCHAR},
      </if>
      <if test="updatePerson != null" >
        #{updatePerson,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="dataSource != null" >
        #{dataSource,jdbcType=VARCHAR},
      </if>
      <if test="vRemark != null" >
        #{vRemark,jdbcType=VARCHAR},
      </if>
      <if test="delFlag != null" >
        #{delFlag,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TJctableExample" resultType="java.lang.Integer" >
    select count(*) from t_jctable
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update t_jctable
    <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.vJcName != null" >
        v_jc_name = #{record.vJcName,jdbcType=VARCHAR},
      </if>
      <if test="record.vJcCode != null" >
        v_jc_code = #{record.vJcCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vWsSrc != null" >
        v_ws_src = #{record.vWsSrc,jdbcType=VARCHAR},
      </if>
      <if test="record.vVedioIp != null" >
        v_vedio_ip = #{record.vVedioIp,jdbcType=VARCHAR},
      </if>
      <if test="record.iVedioPort != null" >
        i_vedio_port = #{record.iVedioPort,jdbcType=INTEGER},
      </if>
      <if test="record.vVedioUser != null" >
        v_vedio_user = #{record.vVedioUser,jdbcType=VARCHAR},
      </if>
      <if test="record.vVedioPwd != null" >
        v_vedio_pwd = #{record.vVedioPwd,jdbcType=VARCHAR},
      </if>
      <if test="record.vVedioTdh != null" >
        v_vedio_tdh = #{record.vVedioTdh,jdbcType=INTEGER},
      </if>
      <if test="record.vCfCode != null" >
        v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="record.vJcpp != null" >
        v_jcpp = #{record.vJcpp,jdbcType=VARCHAR},
      </if>
      <if test="record.updatePerson != null" >
        update_person = #{record.updatePerson,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null" >
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.dataSource != null" >
        data_source = #{record.dataSource,jdbcType=VARCHAR},
      </if>
      <if test="record.vRemark != null" >
        v_remark = #{record.vRemark,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_jctable
    set id = #{record.id,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=VARCHAR},
      v_jc_name = #{record.vJcName,jdbcType=VARCHAR},
      v_jc_code = #{record.vJcCode,jdbcType=VARCHAR},
      v_ws_src = #{record.vWsSrc,jdbcType=VARCHAR},
      v_vedio_ip = #{record.vVedioIp,jdbcType=VARCHAR},
      i_vedio_port = #{record.iVedioPort,jdbcType=INTEGER},
      v_vedio_user = #{record.vVedioUser,jdbcType=VARCHAR},
      v_vedio_pwd = #{record.vVedioPwd,jdbcType=VARCHAR},
      v_vedio_tdh = #{record.vVedioTdh,jdbcType=INTEGER},
      v_cf_code = #{record.vCfCode,jdbcType=VARCHAR},
      v_jcpp = #{record.vJcpp,jdbcType=VARCHAR},
      update_person = #{record.updatePerson,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      data_source = #{record.dataSource,jdbcType=VARCHAR},
      v_remark = #{record.vRemark,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.TJctable" >
    update t_jctable
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="vJcName != null" >
        v_jc_name = #{vJcName,jdbcType=VARCHAR},
      </if>
      <if test="vJcCode != null" >
        v_jc_code = #{vJcCode,jdbcType=VARCHAR},
      </if>
      <if test="vWsSrc != null" >
        v_ws_src = #{vWsSrc,jdbcType=VARCHAR},
      </if>
      <if test="vVedioIp != null" >
        v_vedio_ip = #{vVedioIp,jdbcType=VARCHAR},
      </if>
      <if test="iVedioPort != null" >
        i_vedio_port = #{iVedioPort,jdbcType=INTEGER},
      </if>
      <if test="vVedioUser != null" >
        v_vedio_user = #{vVedioUser,jdbcType=VARCHAR},
      </if>
      <if test="vVedioPwd != null" >
        v_vedio_pwd = #{vVedioPwd,jdbcType=VARCHAR},
      </if>
      <if test="vVedioTdh != null" >
        v_vedio_tdh = #{vVedioTdh,jdbcType=INTEGER},
      </if>
      <if test="vCfCode != null" >
        v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      </if>
      <if test="vJcpp != null" >
        v_jcpp = #{vJcpp,jdbcType=VARCHAR},
      </if>
      <if test="updatePerson != null" >
        update_person = #{updatePerson,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="dataSource != null" >
        data_source = #{dataSource,jdbcType=VARCHAR},
      </if>
      <if test="vRemark != null" >
        v_remark = #{vRemark,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.TJctable" >
    update t_jctable
    set org_id = #{orgId,jdbcType=VARCHAR},
      v_jc_name = #{vJcName,jdbcType=VARCHAR},
      v_jc_code = #{vJcCode,jdbcType=VARCHAR},
      v_ws_src = #{vWsSrc,jdbcType=VARCHAR},
      v_vedio_ip = #{vVedioIp,jdbcType=VARCHAR},
      i_vedio_port = #{iVedioPort,jdbcType=INTEGER},
      v_vedio_user = #{vVedioUser,jdbcType=VARCHAR},
      v_vedio_pwd = #{vVedioPwd,jdbcType=VARCHAR},
      v_vedio_tdh = #{vVedioTdh,jdbcType=INTEGER},
      v_cf_code = #{vCfCode,jdbcType=VARCHAR},
      v_jcpp = #{vJcpp,jdbcType=VARCHAR},
      update_person = #{updatePerson,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      data_source = #{dataSource,jdbcType=VARCHAR},
      v_remark = #{vRemark,jdbcType=VARCHAR},
      del_flag = #{delFlag,jdbcType=INTEGER}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  
  <insert id="insertBatch" parameterType="java.util.List">
    insert into t_jctable (id, org_id, v_jc_name,
    v_jc_code, v_ws_src, v_vedio_ip,
    i_vedio_port, v_vedio_user, v_vedio_pwd,
    v_vedio_tdh, v_cf_code, v_jcpp,
    update_person, update_time, data_source,
    v_remark)
    values
    <foreach collection="list" item="jc" index="index" separator=",">
      (#{jc.id,jdbcType=VARCHAR}, #{jc.orgId,jdbcType=VARCHAR}, #{jc.vJcName,jdbcType=VARCHAR},
      #{jc.vJcCode,jdbcType=VARCHAR}, #{jc.vWsSrc,jdbcType=VARCHAR}, #{jc.vVedioIp,jdbcType=VARCHAR},
      #{jc.iVedioPort,jdbcType=INTEGER}, #{jc.vVedioUser,jdbcType=VARCHAR}, #{jc.vVedioPwd,jdbcType=VARCHAR},
      #{jc.vVedioTdh,jdbcType=INTEGER}, #{jc.vCfCode,jdbcType=VARCHAR}, #{jc.vJcpp,jdbcType=VARCHAR},
      #{jc.updatePerson,jdbcType=VARCHAR}, #{jc.updateTime,jdbcType=TIMESTAMP}, #{jc.dataSource,jdbcType=VARCHAR},
      #{jc.vRemark,jdbcType=VARCHAR})
    </foreach>
  </insert>
</mapper>