<?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.TbPlussDeviceVoiceBoxMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBox">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="boxName" jdbcType="VARCHAR" property="boxname" />
    <result column="boxNo" jdbcType="VARCHAR" property="boxno" />
    <result column="buyMercName" jdbcType="VARCHAR" property="buymercname" />
    <result column="buyMercId" jdbcType="INTEGER" property="buymercid" />
    <result column="orderNo" jdbcType="VARCHAR" property="orderno" />
    <result column="actMercName" jdbcType="VARCHAR" property="actmercname" />
    <result column="actMercId" jdbcType="INTEGER" property="actmercid" />
    <result column="status" jdbcType="CHAR" property="status" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, boxName, boxNo, buyMercName, buyMercId, orderNo, actMercName, actMercId, status, 
    createTime, updateTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_device_voice_box
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_device_voice_box
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBox">
    insert into tb_pluss_device_voice_box (id, boxName, boxNo, 
      buyMercName, buyMercId, orderNo, 
      actMercName, actMercId, status, 
      createTime, updateTime)
    values (#{id,jdbcType=INTEGER}, #{boxname,jdbcType=VARCHAR}, #{boxno,jdbcType=VARCHAR}, 
      #{buymercname,jdbcType=VARCHAR}, #{buymercid,jdbcType=INTEGER}, #{orderno,jdbcType=VARCHAR}, 
      #{actmercname,jdbcType=VARCHAR}, #{actmercid,jdbcType=INTEGER}, #{status,jdbcType=CHAR}, 
      #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBox">
    insert into tb_pluss_device_voice_box
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="boxname != null">
        boxName,
      </if>
      <if test="boxno != null">
        boxNo,
      </if>
      <if test="buymercname != null">
        buyMercName,
      </if>
      <if test="buymercid != null">
        buyMercId,
      </if>
      <if test="orderno != null">
        orderNo,
      </if>
      <if test="actmercname != null">
        actMercName,
      </if>
      <if test="actmercid != null">
        actMercId,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="updatetime != null">
        updateTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="boxname != null">
        #{boxname,jdbcType=VARCHAR},
      </if>
      <if test="boxno != null">
        #{boxno,jdbcType=VARCHAR},
      </if>
      <if test="buymercname != null">
        #{buymercname,jdbcType=VARCHAR},
      </if>
      <if test="buymercid != null">
        #{buymercid,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="actmercname != null">
        #{actmercname,jdbcType=VARCHAR},
      </if>
      <if test="actmercid != null">
        #{actmercid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=CHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBox">
    update tb_pluss_device_voice_box
    <set>
      <if test="boxname != null">
        boxName = #{boxname,jdbcType=VARCHAR},
      </if>
      <if test="boxno != null">
        boxNo = #{boxno,jdbcType=VARCHAR},
      </if>
      <if test="buymercname != null">
        buyMercName = #{buymercname,jdbcType=VARCHAR},
      </if>
      <if test="buymercid != null">
        buyMercId = #{buymercid,jdbcType=INTEGER},
      </if>
      <if test="orderno != null">
        orderNo = #{orderno,jdbcType=VARCHAR},
      </if>
      <if test="actmercname != null">
        actMercName = #{actmercname,jdbcType=VARCHAR},
      </if>
      <if test="actmercid != null">
        actMercId = #{actmercid,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=CHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="updatetime != null">
        updateTime = #{updatetime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBox">
    update tb_pluss_device_voice_box
    set boxName = #{boxname,jdbcType=VARCHAR},
      boxNo = #{boxno,jdbcType=VARCHAR},
      buyMercName = #{buymercname,jdbcType=VARCHAR},
      buyMercId = #{buymercid,jdbcType=INTEGER},
      orderNo = #{orderno,jdbcType=VARCHAR},
      actMercName = #{actmercname,jdbcType=VARCHAR},
      actMercId = #{actmercid,jdbcType=INTEGER},
      status = #{status,jdbcType=CHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      updateTime = #{updatetime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>