<?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.TbPlussRegionReflectMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussRegionReflect">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="channel" jdbcType="INTEGER" property="channel" />
    <result column="regionSrc" jdbcType="INTEGER" property="regionsrc" />
    <result column="regionDes" jdbcType="INTEGER" property="regiondes" />
  </resultMap>
  <sql id="Base_Column_List">
    id, channel, regionSrc, regionDes
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_region_reflect
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_region_reflect
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionReflect">
    insert into tb_pluss_region_reflect (id, channel, regionSrc, 
      regionDes)
    values (#{id,jdbcType=INTEGER}, #{channel,jdbcType=INTEGER}, #{regionsrc,jdbcType=INTEGER}, 
      #{regiondes,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionReflect">
    insert into tb_pluss_region_reflect
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="channel != null">
        channel,
      </if>
      <if test="regionsrc != null">
        regionSrc,
      </if>
      <if test="regiondes != null">
        regionDes,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="channel != null">
        #{channel,jdbcType=INTEGER},
      </if>
      <if test="regionsrc != null">
        #{regionsrc,jdbcType=INTEGER},
      </if>
      <if test="regiondes != null">
        #{regiondes,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionReflect">
    update tb_pluss_region_reflect
    <set>
      <if test="channel != null">
        channel = #{channel,jdbcType=INTEGER},
      </if>
      <if test="regionsrc != null">
        regionSrc = #{regionsrc,jdbcType=INTEGER},
      </if>
      <if test="regiondes != null">
        regionDes = #{regiondes,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussRegionReflect">
    update tb_pluss_region_reflect
    set channel = #{channel,jdbcType=INTEGER},
      regionSrc = #{regionsrc,jdbcType=INTEGER},
      regionDes = #{regiondes,jdbcType=INTEGER}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>