<?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.boco.nbd.wios.manage.mapper.def.OrderInstallItemDeleteMapper" >
  <resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemDelete" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="order_id" property="orderId" jdbcType="VARCHAR" />
    <result column="type" property="type" jdbcType="BIT" />
    <result column="item_type" property="itemType" jdbcType="INTEGER" />
    <result column="item_id" property="itemId" jdbcType="VARCHAR" />
    <result column="item_name" property="itemName" jdbcType="VARCHAR" />
    <result column="item_model" property="itemModel" jdbcType="VARCHAR" />
    <result column="item_warehouse_id" property="itemWarehouseId" jdbcType="VARCHAR" />
    <result column="contract_item_id" property="contractItemId" jdbcType="INTEGER" />
    <result column="qunatity" property="qunatity" jdbcType="DECIMAL" />
    <result column="fee" property="fee" jdbcType="DECIMAL" />
    <result column="description" property="description" jdbcType="VARCHAR" />
    <result column="create_account" property="createAccount" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
    <result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
  </resultMap>

  <sql id="Base_Column_List" >
    id, order_id, type, item_type, item_id, item_name, item_model, item_warehouse_id,
    contract_item_id, qunatity, fee, description, create_account, create_time, modify_account,
    modify_time
  </sql>

  <insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemDelete" >
    insert into t_order_install_item_delete (id, order_id, type,
      item_type, item_id, item_name,
      item_model, item_warehouse_id, contract_item_id,
      qunatity, fee, description,
      create_account, create_time, modify_account,
      modify_time)
    values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{type,jdbcType=BIT},
      #{itemType,jdbcType=INTEGER}, #{itemId,jdbcType=VARCHAR}, #{itemName,jdbcType=VARCHAR},
      #{itemModel,jdbcType=VARCHAR}, #{itemWarehouseId,jdbcType=VARCHAR}, #{contractItemId,jdbcType=INTEGER},
      #{qunatity,jdbcType=DECIMAL}, #{fee,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR},
      #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
      #{modifyTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemDelete" >
    insert into t_order_install_item_delete
    <trim prefix="(" suffix=")" suffixOverrides="," >

      <if test="orderId != null" >
        order_id,
      </if>
      <if test="type != null" >
        type,
      </if>
      <if test="itemType != null" >
        item_type,
      </if>
      <if test="itemId != null" >
        item_id,
      </if>
      <if test="itemName != null" >
        item_name,
      </if>
      <if test="itemModel != null" >
        item_model,
      </if>
      <if test="itemWarehouseId != null" >
        item_warehouse_id,
      </if>
      <if test="contractItemId != null" >
        contract_item_id,
      </if>
      <if test="qunatity != null" >
        qunatity,
      </if>
      <if test="fee != null" >
        fee,
      </if>
      <if test="description != null" >
        description,
      </if>
      <if test="createAccount != null" >
        create_account,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="modifyAccount != null" >
        modify_account,
      </if>
      <if test="modifyTime != null" >
        modify_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >

      <if test="orderId != null" >
        #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="type != null" >
        #{type,jdbcType=BIT},
      </if>
      <if test="itemType != null" >
        #{itemType,jdbcType=INTEGER},
      </if>
      <if test="itemId != null" >
        #{itemId,jdbcType=VARCHAR},
      </if>
      <if test="itemName != null" >
        #{itemName,jdbcType=VARCHAR},
      </if>
      <if test="itemModel != null" >
        #{itemModel,jdbcType=VARCHAR},
      </if>
      <if test="itemWarehouseId != null" >
        #{itemWarehouseId,jdbcType=VARCHAR},
      </if>
      <if test="contractItemId != null" >
        #{contractItemId,jdbcType=INTEGER},
      </if>
      <if test="qunatity != null" >
        #{qunatity,jdbcType=DECIMAL},
      </if>
      <if test="fee != null" >
        #{fee,jdbcType=DECIMAL},
      </if>
      <if test="description != null" >
        #{description,jdbcType=VARCHAR},
      </if>
      <if test="createAccount != null" >
        #{createAccount,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyAccount != null" >
        #{modifyAccount,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null" >
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>

  <insert id="batchInsert" parameterType="java.util.List">
    insert into t_order_install_item_delete ( order_id,type, item_type,
    item_id, item_name, item_model,
    contract_item_id, qunatity, fee,
    description, create_account, create_time,
    modify_account, modify_time)
    values
    <foreach collection="list" item="item" separator=",">
      (#{item.orderId,jdbcType=VARCHAR},#{item.type,jdbcType=INTEGER},  #{item.itemType,jdbcType=INTEGER},
      #{item.itemId,jdbcType=VARCHAR}, #{item.itemName,jdbcType=VARCHAR}, #{item.itemModel,jdbcType=VARCHAR},
      #{item.contractItemId,jdbcType=INTEGER}, #{item.qunatity,jdbcType=DECIMAL}, #{item.fee,jdbcType=DECIMAL},
      #{item.description,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
      #{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP})
    </foreach>
  </insert>
</mapper>