<?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.TbPlussPostageConfigMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussPostageConfig">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="areaCode" jdbcType="VARCHAR" property="areacode" />
    <result column="areaName" jdbcType="VARCHAR" property="areaname" />
    <result column="areaLevel" jdbcType="VARCHAR" property="arealevel" />
    <result column="firstWeight" jdbcType="DECIMAL" property="firstweight" />
    <result column="nextWeight" jdbcType="DECIMAL" property="nextweight" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="status" jdbcType="VARCHAR" property="status" />
  </resultMap>
  <sql id="Base_Column_List">
    id, areaCode, areaName, areaLevel, firstWeight, nextWeight, remark, createTime, status
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_postage_config
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_postage_config
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussPostageConfig">
    insert into tb_pluss_postage_config (id, areaCode, areaName, 
      areaLevel, firstWeight, nextWeight, 
      remark, createTime, status
      )
    values (#{id,jdbcType=INTEGER}, #{areacode,jdbcType=VARCHAR}, #{areaname,jdbcType=VARCHAR}, 
      #{arealevel,jdbcType=VARCHAR}, #{firstweight,jdbcType=DECIMAL}, #{nextweight,jdbcType=DECIMAL}, 
      #{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussPostageConfig">
    insert into tb_pluss_postage_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="areacode != null">
        areaCode,
      </if>
      <if test="areaname != null">
        areaName,
      </if>
      <if test="arealevel != null">
        areaLevel,
      </if>
      <if test="firstweight != null">
        firstWeight,
      </if>
      <if test="nextweight != null">
        nextWeight,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="status != null">
        status,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="areacode != null">
        #{areacode,jdbcType=VARCHAR},
      </if>
      <if test="areaname != null">
        #{areaname,jdbcType=VARCHAR},
      </if>
      <if test="arealevel != null">
        #{arealevel,jdbcType=VARCHAR},
      </if>
      <if test="firstweight != null">
        #{firstweight,jdbcType=DECIMAL},
      </if>
      <if test="nextweight != null">
        #{nextweight,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussPostageConfig">
    update tb_pluss_postage_config
    <set>
      <if test="areacode != null">
        areaCode = #{areacode,jdbcType=VARCHAR},
      </if>
      <if test="areaname != null">
        areaName = #{areaname,jdbcType=VARCHAR},
      </if>
      <if test="arealevel != null">
        areaLevel = #{arealevel,jdbcType=VARCHAR},
      </if>
      <if test="firstweight != null">
        firstWeight = #{firstweight,jdbcType=DECIMAL},
      </if>
      <if test="nextweight != null">
        nextWeight = #{nextweight,jdbcType=DECIMAL},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussPostageConfig">
    update tb_pluss_postage_config
    set areaCode = #{areacode,jdbcType=VARCHAR},
      areaName = #{areaname,jdbcType=VARCHAR},
      areaLevel = #{arealevel,jdbcType=VARCHAR},
      firstWeight = #{firstweight,jdbcType=DECIMAL},
      nextWeight = #{nextweight,jdbcType=DECIMAL},
      remark = #{remark,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      status = #{status,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>