<?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.TbPlussDeviceMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussDevice">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="venderCode" jdbcType="VARCHAR" property="vendercode" />
    <result column="matNo" jdbcType="VARCHAR" property="matno" />
    <result column="deviceLogo" jdbcType="VARCHAR" property="devicelogo" />
    <result column="venderName" jdbcType="VARCHAR" property="vendername" />
    <result column="venderModel" jdbcType="VARCHAR" property="vendermodel" />
    <result column="aisleModel" jdbcType="VARCHAR" property="aislemodel" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="introDesc" jdbcType="VARCHAR" property="introdesc" />
    <result column="seq" jdbcType="INTEGER" property="seq" />
    <result column="status" jdbcType="INTEGER" property="status" />
    <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
    <result column="inventory" jdbcType="INTEGER" property="inventory" />
    <result column="unitPrice" jdbcType="DOUBLE" property="unitprice" />
    <result column="detail" jdbcType="VARCHAR" property="detail" />
  </resultMap>
  <sql id="Base_Column_List">
    id, name, venderCode, matNo, deviceLogo, venderName, venderModel, aisleModel, type, 
    introDesc, seq, status, createDt, inventory, unitPrice, detail
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_device
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_device
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDevice">
    insert into tb_pluss_device (id, name, venderCode, 
      matNo, deviceLogo, venderName, 
      venderModel, aisleModel, type, 
      introDesc, seq, status, 
      createDt, inventory, unitPrice, 
      detail)
    values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{vendercode,jdbcType=VARCHAR}, 
      #{matno,jdbcType=VARCHAR}, #{devicelogo,jdbcType=VARCHAR}, #{vendername,jdbcType=VARCHAR}, 
      #{vendermodel,jdbcType=VARCHAR}, #{aislemodel,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, 
      #{introdesc,jdbcType=VARCHAR}, #{seq,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
      #{createdt,jdbcType=TIMESTAMP}, #{inventory,jdbcType=INTEGER}, #{unitprice,jdbcType=DOUBLE}, 
      #{detail,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDevice">
    insert into tb_pluss_device
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="vendercode != null">
        venderCode,
      </if>
      <if test="matno != null">
        matNo,
      </if>
      <if test="devicelogo != null">
        deviceLogo,
      </if>
      <if test="vendername != null">
        venderName,
      </if>
      <if test="vendermodel != null">
        venderModel,
      </if>
      <if test="aislemodel != null">
        aisleModel,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="introdesc != null">
        introDesc,
      </if>
      <if test="seq != null">
        seq,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="createdt != null">
        createDt,
      </if>
      <if test="inventory != null">
        inventory,
      </if>
      <if test="unitprice != null">
        unitPrice,
      </if>
      <if test="detail != null">
        detail,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="vendercode != null">
        #{vendercode,jdbcType=VARCHAR},
      </if>
      <if test="matno != null">
        #{matno,jdbcType=VARCHAR},
      </if>
      <if test="devicelogo != null">
        #{devicelogo,jdbcType=VARCHAR},
      </if>
      <if test="vendername != null">
        #{vendername,jdbcType=VARCHAR},
      </if>
      <if test="vendermodel != null">
        #{vendermodel,jdbcType=VARCHAR},
      </if>
      <if test="aislemodel != null">
        #{aislemodel,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="introdesc != null">
        #{introdesc,jdbcType=VARCHAR},
      </if>
      <if test="seq != null">
        #{seq,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        #{status,jdbcType=INTEGER},
      </if>
      <if test="createdt != null">
        #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="inventory != null">
        #{inventory,jdbcType=INTEGER},
      </if>
      <if test="unitprice != null">
        #{unitprice,jdbcType=DOUBLE},
      </if>
      <if test="detail != null">
        #{detail,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDevice">
    update tb_pluss_device
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="vendercode != null">
        venderCode = #{vendercode,jdbcType=VARCHAR},
      </if>
      <if test="matno != null">
        matNo = #{matno,jdbcType=VARCHAR},
      </if>
      <if test="devicelogo != null">
        deviceLogo = #{devicelogo,jdbcType=VARCHAR},
      </if>
      <if test="vendername != null">
        venderName = #{vendername,jdbcType=VARCHAR},
      </if>
      <if test="vendermodel != null">
        venderModel = #{vendermodel,jdbcType=VARCHAR},
      </if>
      <if test="aislemodel != null">
        aisleModel = #{aislemodel,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="introdesc != null">
        introDesc = #{introdesc,jdbcType=VARCHAR},
      </if>
      <if test="seq != null">
        seq = #{seq,jdbcType=INTEGER},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="createdt != null">
        createDt = #{createdt,jdbcType=TIMESTAMP},
      </if>
      <if test="inventory != null">
        inventory = #{inventory,jdbcType=INTEGER},
      </if>
      <if test="unitprice != null">
        unitPrice = #{unitprice,jdbcType=DOUBLE},
      </if>
      <if test="detail != null">
        detail = #{detail,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussDevice">
    update tb_pluss_device
    set name = #{name,jdbcType=VARCHAR},
      venderCode = #{vendercode,jdbcType=VARCHAR},
      matNo = #{matno,jdbcType=VARCHAR},
      deviceLogo = #{devicelogo,jdbcType=VARCHAR},
      venderName = #{vendername,jdbcType=VARCHAR},
      venderModel = #{vendermodel,jdbcType=VARCHAR},
      aisleModel = #{aislemodel,jdbcType=VARCHAR},
      type = #{type,jdbcType=VARCHAR},
      introDesc = #{introdesc,jdbcType=VARCHAR},
      seq = #{seq,jdbcType=INTEGER},
      status = #{status,jdbcType=INTEGER},
      createDt = #{createdt,jdbcType=TIMESTAMP},
      inventory = #{inventory,jdbcType=INTEGER},
      unitPrice = #{unitprice,jdbcType=DOUBLE},
      detail = #{detail,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>