<?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.neusoft.smart.pos.order.persistent.mapper.OrderMasterMapper">
  <resultMap id="BaseResultMap" type="com.neusoft.smart.pos.order.persistent.domain.OrderMaster">
    <id column="id" jdbcType="INTEGER" property="id" />
    <id column="order_number" jdbcType="VARCHAR" property="orderNumber" />
    <result column="org_id" jdbcType="INTEGER" property="orgId" />
    <result column="shop_id" jdbcType="INTEGER" property="shopId" />
    <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
    <result column="serial_no" jdbcType="VARCHAR" property="serialNo" />
    <result column="device_name" jdbcType="VARCHAR" property="deviceName" />
    <result column="customer_number" jdbcType="VARCHAR" property="customerNumber" />
    <result column="seq_no" jdbcType="INTEGER" property="seqNo" />
    <result column="order_amount" jdbcType="DECIMAL" property="orderAmount" />
    <result column="real_pay_amount" jdbcType="DECIMAL" property="realPayAmount" />
    <result column="order_amount_unit" jdbcType="VARCHAR" property="orderAmountUnit" />
    <result column="paid_time" jdbcType="TIMESTAMP" property="paidTime" />
    <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
    <result column="order_status" jdbcType="VARCHAR" property="orderStatus" />
    <result column="order_type" jdbcType="VARCHAR" property="orderType" />
    <result column="order_settle_type" jdbcType="VARCHAR" property="orderSettleType" />
    <result column="location_no" jdbcType="VARCHAR" property="locationNo" />
    <result column="time_expire" jdbcType="TIMESTAMP" property="timeExpire" />
    <result column="version" jdbcType="INTEGER" property="version" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
    <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
    <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
    <result column="printer_flag" jdbcType="VARCHAR" property="printerFlag" />
    <result column="order_sub_type" jdbcType="VARCHAR" property="orderSubType" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, order_number, org_id, shop_id, buyer_id, serial_no, device_name, customer_number, 
    seq_no, order_amount, real_pay_amount, order_amount_unit, paid_time, refund_time, 
    order_status, order_type, order_settle_type, location_no, time_expire, version, remark, 
    created_at, created_by, updated_by, updated_at, printer_flag, order_sub_type
  </sql>
  <select id="selectByExample" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMasterExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from order_master_v2
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
    <if test="offset != null and limit != null">
      limit ${offset}, ${limit}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMasterKey" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from order_master_v2
    where id = #{id,jdbcType=INTEGER}
      and order_number = #{orderNumber,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMasterKey">
    delete from order_master_v2
    where id = #{id,jdbcType=INTEGER}
      and order_number = #{orderNumber,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMasterExample">
    delete from order_master_v2
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMaster" useGeneratedKeys="true">
    insert into order_master_v2 (order_number, org_id, shop_id, 
      buyer_id, serial_no, device_name, 
      customer_number, seq_no, order_amount, 
      real_pay_amount, order_amount_unit, paid_time, 
      refund_time, order_status, order_type, 
      order_settle_type, location_no, time_expire, 
      version, remark, created_at, 
      created_by, updated_by, updated_at, 
      printer_flag, order_sub_type)
    values (#{orderNumber,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, 
      #{buyerId,jdbcType=VARCHAR}, #{serialNo,jdbcType=VARCHAR}, #{deviceName,jdbcType=VARCHAR}, 
      #{customerNumber,jdbcType=VARCHAR}, #{seqNo,jdbcType=INTEGER}, #{orderAmount,jdbcType=DECIMAL}, 
      #{realPayAmount,jdbcType=DECIMAL}, #{orderAmountUnit,jdbcType=VARCHAR}, #{paidTime,jdbcType=TIMESTAMP}, 
      #{refundTime,jdbcType=TIMESTAMP}, #{orderStatus,jdbcType=VARCHAR}, #{orderType,jdbcType=VARCHAR}, 
      #{orderSettleType,jdbcType=VARCHAR}, #{locationNo,jdbcType=VARCHAR}, #{timeExpire,jdbcType=TIMESTAMP}, 
      #{version,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, 
      #{createdBy,jdbcType=VARCHAR}, #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, 
      #{printerFlag,jdbcType=VARCHAR}, #{orderSubType,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMaster" useGeneratedKeys="true">
    insert into order_master_v2
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="orderNumber != null">
        order_number,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="shopId != null">
        shop_id,
      </if>
      <if test="buyerId != null">
        buyer_id,
      </if>
      <if test="serialNo != null">
        serial_no,
      </if>
      <if test="deviceName != null">
        device_name,
      </if>
      <if test="customerNumber != null">
        customer_number,
      </if>
      <if test="seqNo != null">
        seq_no,
      </if>
      <if test="orderAmount != null">
        order_amount,
      </if>
      <if test="realPayAmount != null">
        real_pay_amount,
      </if>
      <if test="orderAmountUnit != null">
        order_amount_unit,
      </if>
      <if test="paidTime != null">
        paid_time,
      </if>
      <if test="refundTime != null">
        refund_time,
      </if>
      <if test="orderStatus != null">
        order_status,
      </if>
      <if test="orderType != null">
        order_type,
      </if>
      <if test="orderSettleType != null">
        order_settle_type,
      </if>
      <if test="locationNo != null">
        location_no,
      </if>
      <if test="timeExpire != null">
        time_expire,
      </if>
      <if test="version != null">
        version,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createdAt != null">
        created_at,
      </if>
      <if test="createdBy != null">
        created_by,
      </if>
      <if test="updatedBy != null">
        updated_by,
      </if>
      <if test="updatedAt != null">
        updated_at,
      </if>
      <if test="printerFlag != null">
        printer_flag,
      </if>
      <if test="orderSubType != null">
        order_sub_type,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="orderNumber != null">
        #{orderNumber,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="shopId != null">
        #{shopId,jdbcType=INTEGER},
      </if>
      <if test="buyerId != null">
        #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="serialNo != null">
        #{serialNo,jdbcType=VARCHAR},
      </if>
      <if test="deviceName != null">
        #{deviceName,jdbcType=VARCHAR},
      </if>
      <if test="customerNumber != null">
        #{customerNumber,jdbcType=VARCHAR},
      </if>
      <if test="seqNo != null">
        #{seqNo,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="realPayAmount != null">
        #{realPayAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderAmountUnit != null">
        #{orderAmountUnit,jdbcType=VARCHAR},
      </if>
      <if test="paidTime != null">
        #{paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundTime != null">
        #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="orderStatus != null">
        #{orderStatus,jdbcType=VARCHAR},
      </if>
      <if test="orderType != null">
        #{orderType,jdbcType=VARCHAR},
      </if>
      <if test="orderSettleType != null">
        #{orderSettleType,jdbcType=VARCHAR},
      </if>
      <if test="locationNo != null">
        #{locationNo,jdbcType=VARCHAR},
      </if>
      <if test="timeExpire != null">
        #{timeExpire,jdbcType=TIMESTAMP},
      </if>
      <if test="version != null">
        #{version,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createdAt != null">
        #{createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="createdBy != null">
        #{createdBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedBy != null">
        #{updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedAt != null">
        #{updatedAt,jdbcType=TIMESTAMP},
      </if>
      <if test="printerFlag != null">
        #{printerFlag,jdbcType=VARCHAR},
      </if>
      <if test="orderSubType != null">
        #{orderSubType,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMasterExample" resultType="java.lang.Integer">
    select count(*) from order_master_v2
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update order_master_v2
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=INTEGER},
      </if>
      <if test="record.orderNumber != null">
        order_number = #{record.orderNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=INTEGER},
      </if>
      <if test="record.shopId != null">
        shop_id = #{record.shopId,jdbcType=INTEGER},
      </if>
      <if test="record.buyerId != null">
        buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      </if>
      <if test="record.serialNo != null">
        serial_no = #{record.serialNo,jdbcType=VARCHAR},
      </if>
      <if test="record.deviceName != null">
        device_name = #{record.deviceName,jdbcType=VARCHAR},
      </if>
      <if test="record.customerNumber != null">
        customer_number = #{record.customerNumber,jdbcType=VARCHAR},
      </if>
      <if test="record.seqNo != null">
        seq_no = #{record.seqNo,jdbcType=INTEGER},
      </if>
      <if test="record.orderAmount != null">
        order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.realPayAmount != null">
        real_pay_amount = #{record.realPayAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.orderAmountUnit != null">
        order_amount_unit = #{record.orderAmountUnit,jdbcType=VARCHAR},
      </if>
      <if test="record.paidTime != null">
        paid_time = #{record.paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.refundTime != null">
        refund_time = #{record.refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.orderStatus != null">
        order_status = #{record.orderStatus,jdbcType=VARCHAR},
      </if>
      <if test="record.orderType != null">
        order_type = #{record.orderType,jdbcType=VARCHAR},
      </if>
      <if test="record.orderSettleType != null">
        order_settle_type = #{record.orderSettleType,jdbcType=VARCHAR},
      </if>
      <if test="record.locationNo != null">
        location_no = #{record.locationNo,jdbcType=VARCHAR},
      </if>
      <if test="record.timeExpire != null">
        time_expire = #{record.timeExpire,jdbcType=TIMESTAMP},
      </if>
      <if test="record.version != null">
        version = #{record.version,jdbcType=INTEGER},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.createdAt != null">
        created_at = #{record.createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="record.createdBy != null">
        created_by = #{record.createdBy,jdbcType=VARCHAR},
      </if>
      <if test="record.updatedBy != null">
        updated_by = #{record.updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="record.updatedAt != null">
        updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
      </if>
      <if test="record.printerFlag != null">
        printer_flag = #{record.printerFlag,jdbcType=VARCHAR},
      </if>
      <if test="record.orderSubType != null">
        order_sub_type = #{record.orderSubType,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update order_master_v2
    set id = #{record.id,jdbcType=INTEGER},
      order_number = #{record.orderNumber,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=INTEGER},
      shop_id = #{record.shopId,jdbcType=INTEGER},
      buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      serial_no = #{record.serialNo,jdbcType=VARCHAR},
      device_name = #{record.deviceName,jdbcType=VARCHAR},
      customer_number = #{record.customerNumber,jdbcType=VARCHAR},
      seq_no = #{record.seqNo,jdbcType=INTEGER},
      order_amount = #{record.orderAmount,jdbcType=DECIMAL},
      real_pay_amount = #{record.realPayAmount,jdbcType=DECIMAL},
      order_amount_unit = #{record.orderAmountUnit,jdbcType=VARCHAR},
      paid_time = #{record.paidTime,jdbcType=TIMESTAMP},
      refund_time = #{record.refundTime,jdbcType=TIMESTAMP},
      order_status = #{record.orderStatus,jdbcType=VARCHAR},
      order_type = #{record.orderType,jdbcType=VARCHAR},
      order_settle_type = #{record.orderSettleType,jdbcType=VARCHAR},
      location_no = #{record.locationNo,jdbcType=VARCHAR},
      time_expire = #{record.timeExpire,jdbcType=TIMESTAMP},
      version = #{record.version,jdbcType=INTEGER},
      remark = #{record.remark,jdbcType=VARCHAR},
      created_at = #{record.createdAt,jdbcType=TIMESTAMP},
      created_by = #{record.createdBy,jdbcType=VARCHAR},
      updated_by = #{record.updatedBy,jdbcType=VARCHAR},
      updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
      printer_flag = #{record.printerFlag,jdbcType=VARCHAR},
      order_sub_type = #{record.orderSubType,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMaster">
    update order_master_v2
    <set>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="shopId != null">
        shop_id = #{shopId,jdbcType=INTEGER},
      </if>
      <if test="buyerId != null">
        buyer_id = #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="serialNo != null">
        serial_no = #{serialNo,jdbcType=VARCHAR},
      </if>
      <if test="deviceName != null">
        device_name = #{deviceName,jdbcType=VARCHAR},
      </if>
      <if test="customerNumber != null">
        customer_number = #{customerNumber,jdbcType=VARCHAR},
      </if>
      <if test="seqNo != null">
        seq_no = #{seqNo,jdbcType=INTEGER},
      </if>
      <if test="orderAmount != null">
        order_amount = #{orderAmount,jdbcType=DECIMAL},
      </if>
      <if test="realPayAmount != null">
        real_pay_amount = #{realPayAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderAmountUnit != null">
        order_amount_unit = #{orderAmountUnit,jdbcType=VARCHAR},
      </if>
      <if test="paidTime != null">
        paid_time = #{paidTime,jdbcType=TIMESTAMP},
      </if>
      <if test="refundTime != null">
        refund_time = #{refundTime,jdbcType=TIMESTAMP},
      </if>
      <if test="orderStatus != null">
        order_status = #{orderStatus,jdbcType=VARCHAR},
      </if>
      <if test="orderType != null">
        order_type = #{orderType,jdbcType=VARCHAR},
      </if>
      <if test="orderSettleType != null">
        order_settle_type = #{orderSettleType,jdbcType=VARCHAR},
      </if>
      <if test="locationNo != null">
        location_no = #{locationNo,jdbcType=VARCHAR},
      </if>
      <if test="timeExpire != null">
        time_expire = #{timeExpire,jdbcType=TIMESTAMP},
      </if>
      <if test="version != null">
        version = #{version,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createdAt != null">
        created_at = #{createdAt,jdbcType=TIMESTAMP},
      </if>
      <if test="createdBy != null">
        created_by = #{createdBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedBy != null">
        updated_by = #{updatedBy,jdbcType=VARCHAR},
      </if>
      <if test="updatedAt != null">
        updated_at = #{updatedAt,jdbcType=TIMESTAMP},
      </if>
      <if test="printerFlag != null">
        printer_flag = #{printerFlag,jdbcType=VARCHAR},
      </if>
      <if test="orderSubType != null">
        order_sub_type = #{orderSubType,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
      and order_number = #{orderNumber,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.neusoft.smart.pos.order.persistent.domain.OrderMaster">
    update order_master_v2
    set org_id = #{orgId,jdbcType=INTEGER},
      shop_id = #{shopId,jdbcType=INTEGER},
      buyer_id = #{buyerId,jdbcType=VARCHAR},
      serial_no = #{serialNo,jdbcType=VARCHAR},
      device_name = #{deviceName,jdbcType=VARCHAR},
      customer_number = #{customerNumber,jdbcType=VARCHAR},
      seq_no = #{seqNo,jdbcType=INTEGER},
      order_amount = #{orderAmount,jdbcType=DECIMAL},
      real_pay_amount = #{realPayAmount,jdbcType=DECIMAL},
      order_amount_unit = #{orderAmountUnit,jdbcType=VARCHAR},
      paid_time = #{paidTime,jdbcType=TIMESTAMP},
      refund_time = #{refundTime,jdbcType=TIMESTAMP},
      order_status = #{orderStatus,jdbcType=VARCHAR},
      order_type = #{orderType,jdbcType=VARCHAR},
      order_settle_type = #{orderSettleType,jdbcType=VARCHAR},
      location_no = #{locationNo,jdbcType=VARCHAR},
      time_expire = #{timeExpire,jdbcType=TIMESTAMP},
      version = #{version,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      created_at = #{createdAt,jdbcType=TIMESTAMP},
      created_by = #{createdBy,jdbcType=VARCHAR},
      updated_by = #{updatedBy,jdbcType=VARCHAR},
      updated_at = #{updatedAt,jdbcType=TIMESTAMP},
      printer_flag = #{printerFlag,jdbcType=VARCHAR},
      order_sub_type = #{orderSubType,jdbcType=VARCHAR}
    where id = #{id,jdbcType=INTEGER}
      and order_number = #{orderNumber,jdbcType=VARCHAR}
  </update>
  <insert id="batchInsert">
    <if test="items.get(0) != null">
            insert into order_master_v2  (order_number, org_id, shop_id, 
        buyer_id, serial_no, device_name, 
        customer_number, seq_no, order_amount, 
        real_pay_amount, order_amount_unit, paid_time, 
        refund_time, order_status, order_type, 
        order_settle_type, location_no, time_expire, 
        version, remark, created_at, 
        created_by, updated_by, updated_at, 
        printer_flag, order_sub_type)
      values
      <foreach collection="items" item="item" index="index" separator=",">
      (#{item.orderNumber,jdbcType=VARCHAR}, #{item.orgId,jdbcType=INTEGER}, #{item.shopId,jdbcType=INTEGER}, 
        #{item.buyerId,jdbcType=VARCHAR}, #{item.serialNo,jdbcType=VARCHAR}, #{item.deviceName,jdbcType=VARCHAR}, 
        #{item.customerNumber,jdbcType=VARCHAR}, #{item.seqNo,jdbcType=INTEGER}, #{item.orderAmount,jdbcType=DECIMAL}, 
        #{item.realPayAmount,jdbcType=DECIMAL}, #{item.orderAmountUnit,jdbcType=VARCHAR}, #{item.paidTime,jdbcType=TIMESTAMP}, 
        #{item.refundTime,jdbcType=TIMESTAMP}, #{item.orderStatus,jdbcType=VARCHAR}, #{item.orderType,jdbcType=VARCHAR}, 
        #{item.orderSettleType,jdbcType=VARCHAR}, #{item.locationNo,jdbcType=VARCHAR}, #{item.timeExpire,jdbcType=TIMESTAMP}, 
        #{item.version,jdbcType=INTEGER}, #{item.remark,jdbcType=VARCHAR}, #{item.createdAt,jdbcType=TIMESTAMP}, 
        #{item.createdBy,jdbcType=VARCHAR}, #{item.updatedBy,jdbcType=VARCHAR}, #{item.updatedAt,jdbcType=TIMESTAMP}, 
        #{item.printerFlag,jdbcType=VARCHAR}, #{item.orderSubType,jdbcType=VARCHAR})
      </foreach>
    </if>
  </insert>
</mapper>