<?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="cn.timer.api.dao.kqgl.PunchCardAddressMapper" >
  <resultMap id="BaseResultMap" type="cn.timer.api.bean.kqgl.PunchCardAddress" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="address" property="address" jdbcType="VARCHAR" />
    <result column="dkfw" property="dkfw" jdbcType="INTEGER" />
    <result column="lon" property="lon" jdbcType="DOUBLE" />
    <result column="lat" property="lat" jdbcType="DOUBLE" />
    <result column="qyid" property="qyid" jdbcType="INTEGER" />
    <result column="lusj_time" property="lusjTime" jdbcType="BIGINT" />
    <result column="luryid" property="luryid" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, name, address, dkfw, lon, lat, qyid, lusj_time, luryid
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from kqgl_asso_dkdz
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    delete from kqgl_asso_dkdz
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="cn.timer.api.bean.kqgl.PunchCardAddress" >
    insert into kqgl_asso_dkdz (id, name, address, 
      dkfw, lon, lat, qyid, 
      lusj_time, luryid)
    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, 
      #{dkfw,jdbcType=INTEGER}, #{lon,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{qyid,jdbcType=INTEGER}, 
      #{lusjTime,jdbcType=BIGINT}, #{luryid,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="cn.timer.api.bean.kqgl.PunchCardAddress" >
    insert into kqgl_asso_dkdz
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="name != null" >
        name,
      </if>
      <if test="address != null" >
        address,
      </if>
      <if test="dkfw != null" >
        dkfw,
      </if>
      <if test="lon != null" >
        lon,
      </if>
      <if test="lat != null" >
        lat,
      </if>
      <if test="qyid != null" >
        qyid,
      </if>
      <if test="lusjTime != null" >
        lusj_time,
      </if>
      <if test="luryid != null" >
        luryid,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="name != null" >
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="address != null" >
        #{address,jdbcType=VARCHAR},
      </if>
      <if test="dkfw != null" >
        #{dkfw,jdbcType=INTEGER},
      </if>
      <if test="lon != null" >
        #{lon,jdbcType=DOUBLE},
      </if>
      <if test="lat != null" >
        #{lat,jdbcType=DOUBLE},
      </if>
      <if test="qyid != null" >
        #{qyid,jdbcType=INTEGER},
      </if>
      <if test="lusjTime != null" >
        #{lusjTime,jdbcType=BIGINT},
      </if>
      <if test="luryid != null" >
        #{luryid,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="cn.timer.api.bean.kqgl.PunchCardAddress" >
    update kqgl_asso_dkdz
    <set >
      <if test="name != null" >
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="address != null" >
        address = #{address,jdbcType=VARCHAR},
      </if>
      <if test="dkfw != null" >
        dkfw = #{dkfw,jdbcType=INTEGER},
      </if>
      <if test="lon != null" >
        lon = #{lon,jdbcType=DOUBLE},
      </if>
      <if test="lat != null" >
        lat = #{lat,jdbcType=DOUBLE},
      </if>
      <if test="qyid != null" >
        qyid = #{qyid,jdbcType=INTEGER},
      </if>
      <if test="lusjTime != null" >
        lusj_time = #{lusjTime,jdbcType=BIGINT},
      </if>
      <if test="luryid != null" >
        luryid = #{luryid,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.timer.api.bean.kqgl.PunchCardAddress" >
    update kqgl_asso_dkdz
    set name = #{name,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR},
      dkfw = #{dkfw,jdbcType=INTEGER},
      lon = #{lon,jdbcType=DOUBLE},
      lat = #{lat,jdbcType=DOUBLE},
      qyid = #{qyid,jdbcType=INTEGER},
      lusj_time = #{lusjTime,jdbcType=BIGINT},
      luryid = #{luryid,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
  
  <select id="selectByPrimaryByQyid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from kqgl_asso_dkdz
    where qyid = #{qyid,jdbcType=INTEGER}
  </select>
</mapper>