<?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.TbPlussDeviceVoiceBoxMsgMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsg">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="requestId" jdbcType="VARCHAR" property="requestid" />
    <result column="msgId" jdbcType="VARCHAR" property="msgid" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
    <result column="deviceNo" jdbcType="VARCHAR" property="deviceno" />
    <result column="orderNumber" jdbcType="VARCHAR" property="ordernumber" />
    <result column="type" jdbcType="VARCHAR" property="type" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsgWithBLOBs">
    <result column="body" jdbcType="LONGVARCHAR" property="body" />
    <result column="respBody" jdbcType="LONGVARCHAR" property="respbody" />
  </resultMap>
  <sql id="Base_Column_List">
    id, requestId, msgId, createTime, deviceNo, orderNumber, type
  </sql>
  <sql id="Blob_Column_List">
    body, respBody
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_pluss_device_voice_box_msg
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_device_voice_box_msg
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsgWithBLOBs">
    insert into tb_pluss_device_voice_box_msg (id, requestId, msgId, 
      createTime, deviceNo, orderNumber, 
      type, body, respBody
      )
    values (#{id,jdbcType=INTEGER}, #{requestid,jdbcType=VARCHAR}, #{msgid,jdbcType=VARCHAR}, 
      #{createtime,jdbcType=TIMESTAMP}, #{deviceno,jdbcType=VARCHAR}, #{ordernumber,jdbcType=VARCHAR}, 
      #{type,jdbcType=VARCHAR}, #{body,jdbcType=LONGVARCHAR}, #{respbody,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsgWithBLOBs">
    insert into tb_pluss_device_voice_box_msg
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="requestid != null">
        requestId,
      </if>
      <if test="msgid != null">
        msgId,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
      <if test="deviceno != null">
        deviceNo,
      </if>
      <if test="ordernumber != null">
        orderNumber,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="body != null">
        body,
      </if>
      <if test="respbody != null">
        respBody,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="requestid != null">
        #{requestid,jdbcType=VARCHAR},
      </if>
      <if test="msgid != null">
        #{msgid,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="deviceno != null">
        #{deviceno,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="body != null">
        #{body,jdbcType=LONGVARCHAR},
      </if>
      <if test="respbody != null">
        #{respbody,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsgWithBLOBs">
    update tb_pluss_device_voice_box_msg
    <set>
      <if test="requestid != null">
        requestId = #{requestid,jdbcType=VARCHAR},
      </if>
      <if test="msgid != null">
        msgId = #{msgid,jdbcType=VARCHAR},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
      <if test="deviceno != null">
        deviceNo = #{deviceno,jdbcType=VARCHAR},
      </if>
      <if test="ordernumber != null">
        orderNumber = #{ordernumber,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="body != null">
        body = #{body,jdbcType=LONGVARCHAR},
      </if>
      <if test="respbody != null">
        respBody = #{respbody,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsgWithBLOBs">
    update tb_pluss_device_voice_box_msg
    set requestId = #{requestid,jdbcType=VARCHAR},
      msgId = #{msgid,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      deviceNo = #{deviceno,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      body = #{body,jdbcType=LONGVARCHAR},
      respBody = #{respbody,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDeviceVoiceBoxMsg">
    update tb_pluss_device_voice_box_msg
    set requestId = #{requestid,jdbcType=VARCHAR},
      msgId = #{msgid,jdbcType=VARCHAR},
      createTime = #{createtime,jdbcType=TIMESTAMP},
      deviceNo = #{deviceno,jdbcType=VARCHAR},
      orderNumber = #{ordernumber,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>