<?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.chaozhanggui.dao.system.dao.TbPlussRegionCodeRyxMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussRegionCodeRyx">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="province" jdbcType="VARCHAR" property="province" />
    <result column="provinceCode" jdbcType="VARCHAR" property="provincecode" />
    <result column="city" jdbcType="VARCHAR" property="city" />
    <result column="cityCode" jdbcType="VARCHAR" property="citycode" />
    <result column="area" jdbcType="VARCHAR" property="area" />
    <result column="areaCode" jdbcType="VARCHAR" property="areacode" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, province, provinceCode, city, cityCode, area, areaCode, createTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_region_code_ryx
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_region_code_ryx
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionCodeRyx">
    insert into tb_pluss_region_code_ryx (id, province, provinceCode, 
      city, cityCode, area, 
      areaCode, createTime)
    values (#{id,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, #{provincecode,jdbcType=VARCHAR}, 
      #{city,jdbcType=VARCHAR}, #{citycode,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, 
      #{areacode,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionCodeRyx">
    insert into tb_pluss_region_code_ryx
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="province != null">
        province,
      </if>
      <if test="provincecode != null">
        provinceCode,
      </if>
      <if test="city != null">
        city,
      </if>
      <if test="citycode != null">
        cityCode,
      </if>
      <if test="area != null">
        area,
      </if>
      <if test="areacode != null">
        areaCode,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="province != null">
        #{province,jdbcType=VARCHAR},
      </if>
      <if test="provincecode != null">
        #{provincecode,jdbcType=VARCHAR},
      </if>
      <if test="city != null">
        #{city,jdbcType=VARCHAR},
      </if>
      <if test="citycode != null">
        #{citycode,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        #{area,jdbcType=VARCHAR},
      </if>
      <if test="areacode != null">
        #{areacode,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionCodeRyx">
    update tb_pluss_region_code_ryx
    <set>
      <if test="province != null">
        province = #{province,jdbcType=VARCHAR},
      </if>
      <if test="provincecode != null">
        provinceCode = #{provincecode,jdbcType=VARCHAR},
      </if>
      <if test="city != null">
        city = #{city,jdbcType=VARCHAR},
      </if>
      <if test="citycode != null">
        cityCode = #{citycode,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        area = #{area,jdbcType=VARCHAR},
      </if>
      <if test="areacode != null">
        areaCode = #{areacode,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionCodeRyx">
    update tb_pluss_region_code_ryx
    set province = #{province,jdbcType=VARCHAR},
      provinceCode = #{provincecode,jdbcType=VARCHAR},
      city = #{city,jdbcType=VARCHAR},
      cityCode = #{citycode,jdbcType=VARCHAR},
      area = #{area,jdbcType=VARCHAR},
      areaCode = #{areacode,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>