<?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="cn.superdesk.uniorder.dao.mapper.operationCenter.OperationCenterOrderGoodsMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="biz_type_id" jdbcType="TINYINT" property="bizTypeId" />
    <result column="order_goods_id" jdbcType="VARCHAR" property="orderGoodsId" />
    <result column="order_sn" jdbcType="VARCHAR" property="orderSn" />
    <result column="order_id" jdbcType="VARCHAR" property="orderId" />
    <result column="parent_order_sn" jdbcType="VARCHAR" property="parentOrderSn" />
    <result column="parent_order_id" jdbcType="VARCHAR" property="parentOrderId" />
    <result column="third_party_order_sn" jdbcType="VARCHAR" property="thirdPartyOrderSn" />
    <result column="biz_platform_code" jdbcType="VARCHAR" property="bizPlatformCode" />
    <result column="biz_platform_name" jdbcType="VARCHAR" property="bizPlatformName" />
    <result column="order_type_code" jdbcType="VARCHAR" property="orderTypeCode" />
    <result column="order_type_name" jdbcType="VARCHAR" property="orderTypeName" />
    <result column="order_create_time" jdbcType="TIMESTAMP" property="orderCreateTime" />
    <result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
    <result column="is_package" jdbcType="TINYINT" property="isPackage" />
    <result column="package_id" jdbcType="VARCHAR" property="packageId" />
    <result column="package_name" jdbcType="VARCHAR" property="packageName" />
    <result column="goods_type_id" jdbcType="TINYINT" property="goodsTypeId" />
    <result column="goods_id" jdbcType="VARCHAR" property="goodsId" />
    <result column="goods_sku" jdbcType="VARCHAR" property="goodsSku" />
    <result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
    <result column="quantity" jdbcType="INTEGER" property="quantity" />
    <result column="unit" jdbcType="VARCHAR" property="unit" />
    <result column="original_unit_price" jdbcType="DECIMAL" property="originalUnitPrice" />
    <result column="original_total_price" jdbcType="DECIMAL" property="originalTotalPrice" />
    <result column="selling_unit_price" jdbcType="DECIMAL" property="sellingUnitPrice" />
    <result column="selling_total_price" jdbcType="DECIMAL" property="sellingTotalPrice" />
    <result column="negotiated_unit_price" jdbcType="DECIMAL" property="negotiatedUnitPrice" />
    <result column="negotiated_total_price" jdbcType="DECIMAL" property="negotiatedTotalPrice" />
    <result column="settlement_unit_price" jdbcType="DECIMAL" property="settlementUnitPrice" />
    <result column="settlement_amount" jdbcType="DECIMAL" property="settlementAmount" />
    <result column="cost_unit_price" jdbcType="DECIMAL" property="costUnitPrice" />
    <result column="cost_total_price" jdbcType="DECIMAL" property="costTotalPrice" />
    <result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" />
    <result column="platform_tax_code" jdbcType="VARCHAR" property="platformTaxCode" />
    <result column="platform_tax_rate" jdbcType="DECIMAL" property="platformTaxRate" />
    <result column="merchant_tax_code" jdbcType="VARCHAR" property="merchantTaxCode" />
    <result column="merchant_tax_rate" jdbcType="DECIMAL" property="merchantTaxRate" />
    <result column="is_duty_free" jdbcType="TINYINT" property="isDutyFree" />
    <result column="operator_id" jdbcType="VARCHAR" property="operatorId" />
    <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
    <result column="supplier_id" jdbcType="VARCHAR" property="supplierId" />
    <result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
    <result column="brand_id" jdbcType="VARCHAR" property="brandId" />
    <result column="brand_name" jdbcType="VARCHAR" property="brandName" />
    <result column="cate_level_1_id" jdbcType="VARCHAR" property="cateLevel1Id" />
    <result column="cate_level_1_name" jdbcType="VARCHAR" property="cateLevel1Name" />
    <result column="cate_level_2_id" jdbcType="VARCHAR" property="cateLevel2Id" />
    <result column="cate_level_2_name" jdbcType="VARCHAR" property="cateLevel2Name" />
    <result column="cate_level_3_id" jdbcType="VARCHAR" property="cateLevel3Id" />
    <result column="cate_level_3_name" jdbcType="VARCHAR" property="cateLevel3Name" />
    <result column="goods_specification" jdbcType="VARCHAR" property="goodsSpecification" />
    <result column="refund_origin_order_sn" jdbcType="VARCHAR" property="refundOriginOrderSn" />
    <result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
    <result column="create_user_name" jdbcType="VARCHAR" property="createUserName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
    <result column="update_user_name" jdbcType="VARCHAR" property="updateUserName" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    <result column="other_attribute" jdbcType="LONGVARCHAR" property="otherAttribute" />
  </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, biz_type_id, order_goods_id, order_sn, order_id, parent_order_sn, parent_order_id, 
    third_party_order_sn, biz_platform_code, biz_platform_name, order_type_code, order_type_name, 
    order_create_time, finish_time, is_package, package_id, package_name, goods_type_id, 
    goods_id, goods_sku, goods_name, quantity, unit, original_unit_price, original_total_price, 
    selling_unit_price, selling_total_price, negotiated_unit_price, negotiated_total_price, 
    settlement_unit_price, settlement_amount, cost_unit_price, cost_total_price, discount_amount, 
    platform_tax_code, platform_tax_rate, merchant_tax_code, merchant_tax_rate, is_duty_free, 
    operator_id, operator_name, supplier_id, supplier_name, brand_id, brand_name, cate_level_1_id, 
    cate_level_1_name, cate_level_2_id, cate_level_2_name, cate_level_3_id, cate_level_3_name, 
    goods_specification, refund_origin_order_sn, create_user_id, create_user_name, create_time, 
    update_user_id, update_user_name, update_time
  </sql>
  <sql id="Blob_Column_List">
    other_attribute
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoodsExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_operation_center_order_goods
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoodsExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tb_operation_center_order_goods
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tb_operation_center_order_goods
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_operation_center_order_goods
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoodsExample">
    delete from tb_operation_center_order_goods
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    insert into tb_operation_center_order_goods (id, biz_type_id, order_goods_id, 
      order_sn, order_id, parent_order_sn, 
      parent_order_id, third_party_order_sn, biz_platform_code, 
      biz_platform_name, order_type_code, order_type_name, 
      order_create_time, finish_time, is_package, 
      package_id, package_name, goods_type_id, 
      goods_id, goods_sku, goods_name, 
      quantity, unit, original_unit_price, 
      original_total_price, selling_unit_price, selling_total_price, 
      negotiated_unit_price, negotiated_total_price, 
      settlement_unit_price, settlement_amount, 
      cost_unit_price, cost_total_price, discount_amount, 
      platform_tax_code, platform_tax_rate, merchant_tax_code, 
      merchant_tax_rate, is_duty_free, operator_id, 
      operator_name, supplier_id, supplier_name, 
      brand_id, brand_name, cate_level_1_id, 
      cate_level_1_name, cate_level_2_id, cate_level_2_name, 
      cate_level_3_id, cate_level_3_name, goods_specification, 
      refund_origin_order_sn, create_user_id, create_user_name, 
      create_time, update_user_id, update_user_name, 
      update_time, other_attribute)
    values (#{id,jdbcType=BIGINT}, #{bizTypeId,jdbcType=TINYINT}, #{orderGoodsId,jdbcType=VARCHAR}, 
      #{orderSn,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, #{parentOrderSn,jdbcType=VARCHAR}, 
      #{parentOrderId,jdbcType=VARCHAR}, #{thirdPartyOrderSn,jdbcType=VARCHAR}, #{bizPlatformCode,jdbcType=VARCHAR}, 
      #{bizPlatformName,jdbcType=VARCHAR}, #{orderTypeCode,jdbcType=VARCHAR}, #{orderTypeName,jdbcType=VARCHAR}, 
      #{orderCreateTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, #{isPackage,jdbcType=TINYINT}, 
      #{packageId,jdbcType=VARCHAR}, #{packageName,jdbcType=VARCHAR}, #{goodsTypeId,jdbcType=TINYINT}, 
      #{goodsId,jdbcType=VARCHAR}, #{goodsSku,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, 
      #{quantity,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}, #{originalUnitPrice,jdbcType=DECIMAL}, 
      #{originalTotalPrice,jdbcType=DECIMAL}, #{sellingUnitPrice,jdbcType=DECIMAL}, #{sellingTotalPrice,jdbcType=DECIMAL}, 
      #{negotiatedUnitPrice,jdbcType=DECIMAL}, #{negotiatedTotalPrice,jdbcType=DECIMAL}, 
      #{settlementUnitPrice,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, 
      #{costUnitPrice,jdbcType=DECIMAL}, #{costTotalPrice,jdbcType=DECIMAL}, #{discountAmount,jdbcType=DECIMAL}, 
      #{platformTaxCode,jdbcType=VARCHAR}, #{platformTaxRate,jdbcType=DECIMAL}, #{merchantTaxCode,jdbcType=VARCHAR}, 
      #{merchantTaxRate,jdbcType=DECIMAL}, #{isDutyFree,jdbcType=TINYINT}, #{operatorId,jdbcType=VARCHAR}, 
      #{operatorName,jdbcType=VARCHAR}, #{supplierId,jdbcType=VARCHAR}, #{supplierName,jdbcType=VARCHAR}, 
      #{brandId,jdbcType=VARCHAR}, #{brandName,jdbcType=VARCHAR}, #{cateLevel1Id,jdbcType=VARCHAR}, 
      #{cateLevel1Name,jdbcType=VARCHAR}, #{cateLevel2Id,jdbcType=VARCHAR}, #{cateLevel2Name,jdbcType=VARCHAR}, 
      #{cateLevel3Id,jdbcType=VARCHAR}, #{cateLevel3Name,jdbcType=VARCHAR}, #{goodsSpecification,jdbcType=VARCHAR}, 
      #{refundOriginOrderSn,jdbcType=VARCHAR}, #{createUserId,jdbcType=VARCHAR}, #{createUserName,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=VARCHAR}, #{updateUserName,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{otherAttribute,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    insert into tb_operation_center_order_goods
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="bizTypeId != null">
        biz_type_id,
      </if>
      <if test="orderGoodsId != null">
        order_goods_id,
      </if>
      <if test="orderSn != null">
        order_sn,
      </if>
      <if test="orderId != null">
        order_id,
      </if>
      <if test="parentOrderSn != null">
        parent_order_sn,
      </if>
      <if test="parentOrderId != null">
        parent_order_id,
      </if>
      <if test="thirdPartyOrderSn != null">
        third_party_order_sn,
      </if>
      <if test="bizPlatformCode != null">
        biz_platform_code,
      </if>
      <if test="bizPlatformName != null">
        biz_platform_name,
      </if>
      <if test="orderTypeCode != null">
        order_type_code,
      </if>
      <if test="orderTypeName != null">
        order_type_name,
      </if>
      <if test="orderCreateTime != null">
        order_create_time,
      </if>
      <if test="finishTime != null">
        finish_time,
      </if>
      <if test="isPackage != null">
        is_package,
      </if>
      <if test="packageId != null">
        package_id,
      </if>
      <if test="packageName != null">
        package_name,
      </if>
      <if test="goodsTypeId != null">
        goods_type_id,
      </if>
      <if test="goodsId != null">
        goods_id,
      </if>
      <if test="goodsSku != null">
        goods_sku,
      </if>
      <if test="goodsName != null">
        goods_name,
      </if>
      <if test="quantity != null">
        quantity,
      </if>
      <if test="unit != null">
        unit,
      </if>
      <if test="originalUnitPrice != null">
        original_unit_price,
      </if>
      <if test="originalTotalPrice != null">
        original_total_price,
      </if>
      <if test="sellingUnitPrice != null">
        selling_unit_price,
      </if>
      <if test="sellingTotalPrice != null">
        selling_total_price,
      </if>
      <if test="negotiatedUnitPrice != null">
        negotiated_unit_price,
      </if>
      <if test="negotiatedTotalPrice != null">
        negotiated_total_price,
      </if>
      <if test="settlementUnitPrice != null">
        settlement_unit_price,
      </if>
      <if test="settlementAmount != null">
        settlement_amount,
      </if>
      <if test="costUnitPrice != null">
        cost_unit_price,
      </if>
      <if test="costTotalPrice != null">
        cost_total_price,
      </if>
      <if test="discountAmount != null">
        discount_amount,
      </if>
      <if test="platformTaxCode != null">
        platform_tax_code,
      </if>
      <if test="platformTaxRate != null">
        platform_tax_rate,
      </if>
      <if test="merchantTaxCode != null">
        merchant_tax_code,
      </if>
      <if test="merchantTaxRate != null">
        merchant_tax_rate,
      </if>
      <if test="isDutyFree != null">
        is_duty_free,
      </if>
      <if test="operatorId != null">
        operator_id,
      </if>
      <if test="operatorName != null">
        operator_name,
      </if>
      <if test="supplierId != null">
        supplier_id,
      </if>
      <if test="supplierName != null">
        supplier_name,
      </if>
      <if test="brandId != null">
        brand_id,
      </if>
      <if test="brandName != null">
        brand_name,
      </if>
      <if test="cateLevel1Id != null">
        cate_level_1_id,
      </if>
      <if test="cateLevel1Name != null">
        cate_level_1_name,
      </if>
      <if test="cateLevel2Id != null">
        cate_level_2_id,
      </if>
      <if test="cateLevel2Name != null">
        cate_level_2_name,
      </if>
      <if test="cateLevel3Id != null">
        cate_level_3_id,
      </if>
      <if test="cateLevel3Name != null">
        cate_level_3_name,
      </if>
      <if test="goodsSpecification != null">
        goods_specification,
      </if>
      <if test="refundOriginOrderSn != null">
        refund_origin_order_sn,
      </if>
      <if test="createUserId != null">
        create_user_id,
      </if>
      <if test="createUserName != null">
        create_user_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateUserId != null">
        update_user_id,
      </if>
      <if test="updateUserName != null">
        update_user_name,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="otherAttribute != null">
        other_attribute,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="bizTypeId != null">
        #{bizTypeId,jdbcType=TINYINT},
      </if>
      <if test="orderGoodsId != null">
        #{orderGoodsId,jdbcType=VARCHAR},
      </if>
      <if test="orderSn != null">
        #{orderSn,jdbcType=VARCHAR},
      </if>
      <if test="orderId != null">
        #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="parentOrderSn != null">
        #{parentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="parentOrderId != null">
        #{parentOrderId,jdbcType=VARCHAR},
      </if>
      <if test="thirdPartyOrderSn != null">
        #{thirdPartyOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="bizPlatformCode != null">
        #{bizPlatformCode,jdbcType=VARCHAR},
      </if>
      <if test="bizPlatformName != null">
        #{bizPlatformName,jdbcType=VARCHAR},
      </if>
      <if test="orderTypeCode != null">
        #{orderTypeCode,jdbcType=VARCHAR},
      </if>
      <if test="orderTypeName != null">
        #{orderTypeName,jdbcType=VARCHAR},
      </if>
      <if test="orderCreateTime != null">
        #{orderCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="finishTime != null">
        #{finishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="isPackage != null">
        #{isPackage,jdbcType=TINYINT},
      </if>
      <if test="packageId != null">
        #{packageId,jdbcType=VARCHAR},
      </if>
      <if test="packageName != null">
        #{packageName,jdbcType=VARCHAR},
      </if>
      <if test="goodsTypeId != null">
        #{goodsTypeId,jdbcType=TINYINT},
      </if>
      <if test="goodsId != null">
        #{goodsId,jdbcType=VARCHAR},
      </if>
      <if test="goodsSku != null">
        #{goodsSku,jdbcType=VARCHAR},
      </if>
      <if test="goodsName != null">
        #{goodsName,jdbcType=VARCHAR},
      </if>
      <if test="quantity != null">
        #{quantity,jdbcType=INTEGER},
      </if>
      <if test="unit != null">
        #{unit,jdbcType=VARCHAR},
      </if>
      <if test="originalUnitPrice != null">
        #{originalUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="originalTotalPrice != null">
        #{originalTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="sellingUnitPrice != null">
        #{sellingUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="sellingTotalPrice != null">
        #{sellingTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="negotiatedUnitPrice != null">
        #{negotiatedUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="negotiatedTotalPrice != null">
        #{negotiatedTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="settlementUnitPrice != null">
        #{settlementUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="settlementAmount != null">
        #{settlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="costUnitPrice != null">
        #{costUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="costTotalPrice != null">
        #{costTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="discountAmount != null">
        #{discountAmount,jdbcType=DECIMAL},
      </if>
      <if test="platformTaxCode != null">
        #{platformTaxCode,jdbcType=VARCHAR},
      </if>
      <if test="platformTaxRate != null">
        #{platformTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="merchantTaxCode != null">
        #{merchantTaxCode,jdbcType=VARCHAR},
      </if>
      <if test="merchantTaxRate != null">
        #{merchantTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="isDutyFree != null">
        #{isDutyFree,jdbcType=TINYINT},
      </if>
      <if test="operatorId != null">
        #{operatorId,jdbcType=VARCHAR},
      </if>
      <if test="operatorName != null">
        #{operatorName,jdbcType=VARCHAR},
      </if>
      <if test="supplierId != null">
        #{supplierId,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="brandId != null">
        #{brandId,jdbcType=VARCHAR},
      </if>
      <if test="brandName != null">
        #{brandName,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel1Id != null">
        #{cateLevel1Id,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel1Name != null">
        #{cateLevel1Name,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel2Id != null">
        #{cateLevel2Id,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel2Name != null">
        #{cateLevel2Name,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel3Id != null">
        #{cateLevel3Id,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel3Name != null">
        #{cateLevel3Name,jdbcType=VARCHAR},
      </if>
      <if test="goodsSpecification != null">
        #{goodsSpecification,jdbcType=VARCHAR},
      </if>
      <if test="refundOriginOrderSn != null">
        #{refundOriginOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="createUserId != null">
        #{createUserId,jdbcType=VARCHAR},
      </if>
      <if test="createUserName != null">
        #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        #{updateUserId,jdbcType=VARCHAR},
      </if>
      <if test="updateUserName != null">
        #{updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="otherAttribute != null">
        #{otherAttribute,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoodsExample" resultType="java.lang.Long">
    select count(*) from tb_operation_center_order_goods
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tb_operation_center_order_goods
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.bizTypeId != null">
        biz_type_id = #{record.bizTypeId,jdbcType=TINYINT},
      </if>
      <if test="record.orderGoodsId != null">
        order_goods_id = #{record.orderGoodsId,jdbcType=VARCHAR},
      </if>
      <if test="record.orderSn != null">
        order_sn = #{record.orderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.orderId != null">
        order_id = #{record.orderId,jdbcType=VARCHAR},
      </if>
      <if test="record.parentOrderSn != null">
        parent_order_sn = #{record.parentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.parentOrderId != null">
        parent_order_id = #{record.parentOrderId,jdbcType=VARCHAR},
      </if>
      <if test="record.thirdPartyOrderSn != null">
        third_party_order_sn = #{record.thirdPartyOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.bizPlatformCode != null">
        biz_platform_code = #{record.bizPlatformCode,jdbcType=VARCHAR},
      </if>
      <if test="record.bizPlatformName != null">
        biz_platform_name = #{record.bizPlatformName,jdbcType=VARCHAR},
      </if>
      <if test="record.orderTypeCode != null">
        order_type_code = #{record.orderTypeCode,jdbcType=VARCHAR},
      </if>
      <if test="record.orderTypeName != null">
        order_type_name = #{record.orderTypeName,jdbcType=VARCHAR},
      </if>
      <if test="record.orderCreateTime != null">
        order_create_time = #{record.orderCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.finishTime != null">
        finish_time = #{record.finishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.isPackage != null">
        is_package = #{record.isPackage,jdbcType=TINYINT},
      </if>
      <if test="record.packageId != null">
        package_id = #{record.packageId,jdbcType=VARCHAR},
      </if>
      <if test="record.packageName != null">
        package_name = #{record.packageName,jdbcType=VARCHAR},
      </if>
      <if test="record.goodsTypeId != null">
        goods_type_id = #{record.goodsTypeId,jdbcType=TINYINT},
      </if>
      <if test="record.goodsId != null">
        goods_id = #{record.goodsId,jdbcType=VARCHAR},
      </if>
      <if test="record.goodsSku != null">
        goods_sku = #{record.goodsSku,jdbcType=VARCHAR},
      </if>
      <if test="record.goodsName != null">
        goods_name = #{record.goodsName,jdbcType=VARCHAR},
      </if>
      <if test="record.quantity != null">
        quantity = #{record.quantity,jdbcType=INTEGER},
      </if>
      <if test="record.unit != null">
        unit = #{record.unit,jdbcType=VARCHAR},
      </if>
      <if test="record.originalUnitPrice != null">
        original_unit_price = #{record.originalUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.originalTotalPrice != null">
        original_total_price = #{record.originalTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.sellingUnitPrice != null">
        selling_unit_price = #{record.sellingUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.sellingTotalPrice != null">
        selling_total_price = #{record.sellingTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.negotiatedUnitPrice != null">
        negotiated_unit_price = #{record.negotiatedUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.negotiatedTotalPrice != null">
        negotiated_total_price = #{record.negotiatedTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.settlementUnitPrice != null">
        settlement_unit_price = #{record.settlementUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.settlementAmount != null">
        settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.costUnitPrice != null">
        cost_unit_price = #{record.costUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.costTotalPrice != null">
        cost_total_price = #{record.costTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.discountAmount != null">
        discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.platformTaxCode != null">
        platform_tax_code = #{record.platformTaxCode,jdbcType=VARCHAR},
      </if>
      <if test="record.platformTaxRate != null">
        platform_tax_rate = #{record.platformTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="record.merchantTaxCode != null">
        merchant_tax_code = #{record.merchantTaxCode,jdbcType=VARCHAR},
      </if>
      <if test="record.merchantTaxRate != null">
        merchant_tax_rate = #{record.merchantTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="record.isDutyFree != null">
        is_duty_free = #{record.isDutyFree,jdbcType=TINYINT},
      </if>
      <if test="record.operatorId != null">
        operator_id = #{record.operatorId,jdbcType=VARCHAR},
      </if>
      <if test="record.operatorName != null">
        operator_name = #{record.operatorName,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierId != null">
        supplier_id = #{record.supplierId,jdbcType=VARCHAR},
      </if>
      <if test="record.supplierName != null">
        supplier_name = #{record.supplierName,jdbcType=VARCHAR},
      </if>
      <if test="record.brandId != null">
        brand_id = #{record.brandId,jdbcType=VARCHAR},
      </if>
      <if test="record.brandName != null">
        brand_name = #{record.brandName,jdbcType=VARCHAR},
      </if>
      <if test="record.cateLevel1Id != null">
        cate_level_1_id = #{record.cateLevel1Id,jdbcType=VARCHAR},
      </if>
      <if test="record.cateLevel1Name != null">
        cate_level_1_name = #{record.cateLevel1Name,jdbcType=VARCHAR},
      </if>
      <if test="record.cateLevel2Id != null">
        cate_level_2_id = #{record.cateLevel2Id,jdbcType=VARCHAR},
      </if>
      <if test="record.cateLevel2Name != null">
        cate_level_2_name = #{record.cateLevel2Name,jdbcType=VARCHAR},
      </if>
      <if test="record.cateLevel3Id != null">
        cate_level_3_id = #{record.cateLevel3Id,jdbcType=VARCHAR},
      </if>
      <if test="record.cateLevel3Name != null">
        cate_level_3_name = #{record.cateLevel3Name,jdbcType=VARCHAR},
      </if>
      <if test="record.goodsSpecification != null">
        goods_specification = #{record.goodsSpecification,jdbcType=VARCHAR},
      </if>
      <if test="record.refundOriginOrderSn != null">
        refund_origin_order_sn = #{record.refundOriginOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.createUserId != null">
        create_user_id = #{record.createUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.createUserName != null">
        create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateUserId != null">
        update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
      </if>
      <if test="record.updateUserName != null">
        update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.otherAttribute != null">
        other_attribute = #{record.otherAttribute,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update tb_operation_center_order_goods
    set id = #{record.id,jdbcType=BIGINT},
      biz_type_id = #{record.bizTypeId,jdbcType=TINYINT},
      order_goods_id = #{record.orderGoodsId,jdbcType=VARCHAR},
      order_sn = #{record.orderSn,jdbcType=VARCHAR},
      order_id = #{record.orderId,jdbcType=VARCHAR},
      parent_order_sn = #{record.parentOrderSn,jdbcType=VARCHAR},
      parent_order_id = #{record.parentOrderId,jdbcType=VARCHAR},
      third_party_order_sn = #{record.thirdPartyOrderSn,jdbcType=VARCHAR},
      biz_platform_code = #{record.bizPlatformCode,jdbcType=VARCHAR},
      biz_platform_name = #{record.bizPlatformName,jdbcType=VARCHAR},
      order_type_code = #{record.orderTypeCode,jdbcType=VARCHAR},
      order_type_name = #{record.orderTypeName,jdbcType=VARCHAR},
      order_create_time = #{record.orderCreateTime,jdbcType=TIMESTAMP},
      finish_time = #{record.finishTime,jdbcType=TIMESTAMP},
      is_package = #{record.isPackage,jdbcType=TINYINT},
      package_id = #{record.packageId,jdbcType=VARCHAR},
      package_name = #{record.packageName,jdbcType=VARCHAR},
      goods_type_id = #{record.goodsTypeId,jdbcType=TINYINT},
      goods_id = #{record.goodsId,jdbcType=VARCHAR},
      goods_sku = #{record.goodsSku,jdbcType=VARCHAR},
      goods_name = #{record.goodsName,jdbcType=VARCHAR},
      quantity = #{record.quantity,jdbcType=INTEGER},
      unit = #{record.unit,jdbcType=VARCHAR},
      original_unit_price = #{record.originalUnitPrice,jdbcType=DECIMAL},
      original_total_price = #{record.originalTotalPrice,jdbcType=DECIMAL},
      selling_unit_price = #{record.sellingUnitPrice,jdbcType=DECIMAL},
      selling_total_price = #{record.sellingTotalPrice,jdbcType=DECIMAL},
      negotiated_unit_price = #{record.negotiatedUnitPrice,jdbcType=DECIMAL},
      negotiated_total_price = #{record.negotiatedTotalPrice,jdbcType=DECIMAL},
      settlement_unit_price = #{record.settlementUnitPrice,jdbcType=DECIMAL},
      settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
      cost_unit_price = #{record.costUnitPrice,jdbcType=DECIMAL},
      cost_total_price = #{record.costTotalPrice,jdbcType=DECIMAL},
      discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
      platform_tax_code = #{record.platformTaxCode,jdbcType=VARCHAR},
      platform_tax_rate = #{record.platformTaxRate,jdbcType=DECIMAL},
      merchant_tax_code = #{record.merchantTaxCode,jdbcType=VARCHAR},
      merchant_tax_rate = #{record.merchantTaxRate,jdbcType=DECIMAL},
      is_duty_free = #{record.isDutyFree,jdbcType=TINYINT},
      operator_id = #{record.operatorId,jdbcType=VARCHAR},
      operator_name = #{record.operatorName,jdbcType=VARCHAR},
      supplier_id = #{record.supplierId,jdbcType=VARCHAR},
      supplier_name = #{record.supplierName,jdbcType=VARCHAR},
      brand_id = #{record.brandId,jdbcType=VARCHAR},
      brand_name = #{record.brandName,jdbcType=VARCHAR},
      cate_level_1_id = #{record.cateLevel1Id,jdbcType=VARCHAR},
      cate_level_1_name = #{record.cateLevel1Name,jdbcType=VARCHAR},
      cate_level_2_id = #{record.cateLevel2Id,jdbcType=VARCHAR},
      cate_level_2_name = #{record.cateLevel2Name,jdbcType=VARCHAR},
      cate_level_3_id = #{record.cateLevel3Id,jdbcType=VARCHAR},
      cate_level_3_name = #{record.cateLevel3Name,jdbcType=VARCHAR},
      goods_specification = #{record.goodsSpecification,jdbcType=VARCHAR},
      refund_origin_order_sn = #{record.refundOriginOrderSn,jdbcType=VARCHAR},
      create_user_id = #{record.createUserId,jdbcType=VARCHAR},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
      update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      other_attribute = #{record.otherAttribute,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tb_operation_center_order_goods
    set id = #{record.id,jdbcType=BIGINT},
      biz_type_id = #{record.bizTypeId,jdbcType=TINYINT},
      order_goods_id = #{record.orderGoodsId,jdbcType=VARCHAR},
      order_sn = #{record.orderSn,jdbcType=VARCHAR},
      order_id = #{record.orderId,jdbcType=VARCHAR},
      parent_order_sn = #{record.parentOrderSn,jdbcType=VARCHAR},
      parent_order_id = #{record.parentOrderId,jdbcType=VARCHAR},
      third_party_order_sn = #{record.thirdPartyOrderSn,jdbcType=VARCHAR},
      biz_platform_code = #{record.bizPlatformCode,jdbcType=VARCHAR},
      biz_platform_name = #{record.bizPlatformName,jdbcType=VARCHAR},
      order_type_code = #{record.orderTypeCode,jdbcType=VARCHAR},
      order_type_name = #{record.orderTypeName,jdbcType=VARCHAR},
      order_create_time = #{record.orderCreateTime,jdbcType=TIMESTAMP},
      finish_time = #{record.finishTime,jdbcType=TIMESTAMP},
      is_package = #{record.isPackage,jdbcType=TINYINT},
      package_id = #{record.packageId,jdbcType=VARCHAR},
      package_name = #{record.packageName,jdbcType=VARCHAR},
      goods_type_id = #{record.goodsTypeId,jdbcType=TINYINT},
      goods_id = #{record.goodsId,jdbcType=VARCHAR},
      goods_sku = #{record.goodsSku,jdbcType=VARCHAR},
      goods_name = #{record.goodsName,jdbcType=VARCHAR},
      quantity = #{record.quantity,jdbcType=INTEGER},
      unit = #{record.unit,jdbcType=VARCHAR},
      original_unit_price = #{record.originalUnitPrice,jdbcType=DECIMAL},
      original_total_price = #{record.originalTotalPrice,jdbcType=DECIMAL},
      selling_unit_price = #{record.sellingUnitPrice,jdbcType=DECIMAL},
      selling_total_price = #{record.sellingTotalPrice,jdbcType=DECIMAL},
      negotiated_unit_price = #{record.negotiatedUnitPrice,jdbcType=DECIMAL},
      negotiated_total_price = #{record.negotiatedTotalPrice,jdbcType=DECIMAL},
      settlement_unit_price = #{record.settlementUnitPrice,jdbcType=DECIMAL},
      settlement_amount = #{record.settlementAmount,jdbcType=DECIMAL},
      cost_unit_price = #{record.costUnitPrice,jdbcType=DECIMAL},
      cost_total_price = #{record.costTotalPrice,jdbcType=DECIMAL},
      discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
      platform_tax_code = #{record.platformTaxCode,jdbcType=VARCHAR},
      platform_tax_rate = #{record.platformTaxRate,jdbcType=DECIMAL},
      merchant_tax_code = #{record.merchantTaxCode,jdbcType=VARCHAR},
      merchant_tax_rate = #{record.merchantTaxRate,jdbcType=DECIMAL},
      is_duty_free = #{record.isDutyFree,jdbcType=TINYINT},
      operator_id = #{record.operatorId,jdbcType=VARCHAR},
      operator_name = #{record.operatorName,jdbcType=VARCHAR},
      supplier_id = #{record.supplierId,jdbcType=VARCHAR},
      supplier_name = #{record.supplierName,jdbcType=VARCHAR},
      brand_id = #{record.brandId,jdbcType=VARCHAR},
      brand_name = #{record.brandName,jdbcType=VARCHAR},
      cate_level_1_id = #{record.cateLevel1Id,jdbcType=VARCHAR},
      cate_level_1_name = #{record.cateLevel1Name,jdbcType=VARCHAR},
      cate_level_2_id = #{record.cateLevel2Id,jdbcType=VARCHAR},
      cate_level_2_name = #{record.cateLevel2Name,jdbcType=VARCHAR},
      cate_level_3_id = #{record.cateLevel3Id,jdbcType=VARCHAR},
      cate_level_3_name = #{record.cateLevel3Name,jdbcType=VARCHAR},
      goods_specification = #{record.goodsSpecification,jdbcType=VARCHAR},
      refund_origin_order_sn = #{record.refundOriginOrderSn,jdbcType=VARCHAR},
      create_user_id = #{record.createUserId,jdbcType=VARCHAR},
      create_user_name = #{record.createUserName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
      update_user_name = #{record.updateUserName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    update tb_operation_center_order_goods
    <set>
      <if test="bizTypeId != null">
        biz_type_id = #{bizTypeId,jdbcType=TINYINT},
      </if>
      <if test="orderGoodsId != null">
        order_goods_id = #{orderGoodsId,jdbcType=VARCHAR},
      </if>
      <if test="orderSn != null">
        order_sn = #{orderSn,jdbcType=VARCHAR},
      </if>
      <if test="orderId != null">
        order_id = #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="parentOrderSn != null">
        parent_order_sn = #{parentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="parentOrderId != null">
        parent_order_id = #{parentOrderId,jdbcType=VARCHAR},
      </if>
      <if test="thirdPartyOrderSn != null">
        third_party_order_sn = #{thirdPartyOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="bizPlatformCode != null">
        biz_platform_code = #{bizPlatformCode,jdbcType=VARCHAR},
      </if>
      <if test="bizPlatformName != null">
        biz_platform_name = #{bizPlatformName,jdbcType=VARCHAR},
      </if>
      <if test="orderTypeCode != null">
        order_type_code = #{orderTypeCode,jdbcType=VARCHAR},
      </if>
      <if test="orderTypeName != null">
        order_type_name = #{orderTypeName,jdbcType=VARCHAR},
      </if>
      <if test="orderCreateTime != null">
        order_create_time = #{orderCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="finishTime != null">
        finish_time = #{finishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="isPackage != null">
        is_package = #{isPackage,jdbcType=TINYINT},
      </if>
      <if test="packageId != null">
        package_id = #{packageId,jdbcType=VARCHAR},
      </if>
      <if test="packageName != null">
        package_name = #{packageName,jdbcType=VARCHAR},
      </if>
      <if test="goodsTypeId != null">
        goods_type_id = #{goodsTypeId,jdbcType=TINYINT},
      </if>
      <if test="goodsId != null">
        goods_id = #{goodsId,jdbcType=VARCHAR},
      </if>
      <if test="goodsSku != null">
        goods_sku = #{goodsSku,jdbcType=VARCHAR},
      </if>
      <if test="goodsName != null">
        goods_name = #{goodsName,jdbcType=VARCHAR},
      </if>
      <if test="quantity != null">
        quantity = #{quantity,jdbcType=INTEGER},
      </if>
      <if test="unit != null">
        unit = #{unit,jdbcType=VARCHAR},
      </if>
      <if test="originalUnitPrice != null">
        original_unit_price = #{originalUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="originalTotalPrice != null">
        original_total_price = #{originalTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="sellingUnitPrice != null">
        selling_unit_price = #{sellingUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="sellingTotalPrice != null">
        selling_total_price = #{sellingTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="negotiatedUnitPrice != null">
        negotiated_unit_price = #{negotiatedUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="negotiatedTotalPrice != null">
        negotiated_total_price = #{negotiatedTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="settlementUnitPrice != null">
        settlement_unit_price = #{settlementUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="settlementAmount != null">
        settlement_amount = #{settlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="costUnitPrice != null">
        cost_unit_price = #{costUnitPrice,jdbcType=DECIMAL},
      </if>
      <if test="costTotalPrice != null">
        cost_total_price = #{costTotalPrice,jdbcType=DECIMAL},
      </if>
      <if test="discountAmount != null">
        discount_amount = #{discountAmount,jdbcType=DECIMAL},
      </if>
      <if test="platformTaxCode != null">
        platform_tax_code = #{platformTaxCode,jdbcType=VARCHAR},
      </if>
      <if test="platformTaxRate != null">
        platform_tax_rate = #{platformTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="merchantTaxCode != null">
        merchant_tax_code = #{merchantTaxCode,jdbcType=VARCHAR},
      </if>
      <if test="merchantTaxRate != null">
        merchant_tax_rate = #{merchantTaxRate,jdbcType=DECIMAL},
      </if>
      <if test="isDutyFree != null">
        is_duty_free = #{isDutyFree,jdbcType=TINYINT},
      </if>
      <if test="operatorId != null">
        operator_id = #{operatorId,jdbcType=VARCHAR},
      </if>
      <if test="operatorName != null">
        operator_name = #{operatorName,jdbcType=VARCHAR},
      </if>
      <if test="supplierId != null">
        supplier_id = #{supplierId,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        supplier_name = #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="brandId != null">
        brand_id = #{brandId,jdbcType=VARCHAR},
      </if>
      <if test="brandName != null">
        brand_name = #{brandName,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel1Id != null">
        cate_level_1_id = #{cateLevel1Id,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel1Name != null">
        cate_level_1_name = #{cateLevel1Name,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel2Id != null">
        cate_level_2_id = #{cateLevel2Id,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel2Name != null">
        cate_level_2_name = #{cateLevel2Name,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel3Id != null">
        cate_level_3_id = #{cateLevel3Id,jdbcType=VARCHAR},
      </if>
      <if test="cateLevel3Name != null">
        cate_level_3_name = #{cateLevel3Name,jdbcType=VARCHAR},
      </if>
      <if test="goodsSpecification != null">
        goods_specification = #{goodsSpecification,jdbcType=VARCHAR},
      </if>
      <if test="refundOriginOrderSn != null">
        refund_origin_order_sn = #{refundOriginOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="createUserId != null">
        create_user_id = #{createUserId,jdbcType=VARCHAR},
      </if>
      <if test="createUserName != null">
        create_user_name = #{createUserName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateUserId != null">
        update_user_id = #{updateUserId,jdbcType=VARCHAR},
      </if>
      <if test="updateUserName != null">
        update_user_name = #{updateUserName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="otherAttribute != null">
        other_attribute = #{otherAttribute,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    update tb_operation_center_order_goods
    set biz_type_id = #{bizTypeId,jdbcType=TINYINT},
      order_goods_id = #{orderGoodsId,jdbcType=VARCHAR},
      order_sn = #{orderSn,jdbcType=VARCHAR},
      order_id = #{orderId,jdbcType=VARCHAR},
      parent_order_sn = #{parentOrderSn,jdbcType=VARCHAR},
      parent_order_id = #{parentOrderId,jdbcType=VARCHAR},
      third_party_order_sn = #{thirdPartyOrderSn,jdbcType=VARCHAR},
      biz_platform_code = #{bizPlatformCode,jdbcType=VARCHAR},
      biz_platform_name = #{bizPlatformName,jdbcType=VARCHAR},
      order_type_code = #{orderTypeCode,jdbcType=VARCHAR},
      order_type_name = #{orderTypeName,jdbcType=VARCHAR},
      order_create_time = #{orderCreateTime,jdbcType=TIMESTAMP},
      finish_time = #{finishTime,jdbcType=TIMESTAMP},
      is_package = #{isPackage,jdbcType=TINYINT},
      package_id = #{packageId,jdbcType=VARCHAR},
      package_name = #{packageName,jdbcType=VARCHAR},
      goods_type_id = #{goodsTypeId,jdbcType=TINYINT},
      goods_id = #{goodsId,jdbcType=VARCHAR},
      goods_sku = #{goodsSku,jdbcType=VARCHAR},
      goods_name = #{goodsName,jdbcType=VARCHAR},
      quantity = #{quantity,jdbcType=INTEGER},
      unit = #{unit,jdbcType=VARCHAR},
      original_unit_price = #{originalUnitPrice,jdbcType=DECIMAL},
      original_total_price = #{originalTotalPrice,jdbcType=DECIMAL},
      selling_unit_price = #{sellingUnitPrice,jdbcType=DECIMAL},
      selling_total_price = #{sellingTotalPrice,jdbcType=DECIMAL},
      negotiated_unit_price = #{negotiatedUnitPrice,jdbcType=DECIMAL},
      negotiated_total_price = #{negotiatedTotalPrice,jdbcType=DECIMAL},
      settlement_unit_price = #{settlementUnitPrice,jdbcType=DECIMAL},
      settlement_amount = #{settlementAmount,jdbcType=DECIMAL},
      cost_unit_price = #{costUnitPrice,jdbcType=DECIMAL},
      cost_total_price = #{costTotalPrice,jdbcType=DECIMAL},
      discount_amount = #{discountAmount,jdbcType=DECIMAL},
      platform_tax_code = #{platformTaxCode,jdbcType=VARCHAR},
      platform_tax_rate = #{platformTaxRate,jdbcType=DECIMAL},
      merchant_tax_code = #{merchantTaxCode,jdbcType=VARCHAR},
      merchant_tax_rate = #{merchantTaxRate,jdbcType=DECIMAL},
      is_duty_free = #{isDutyFree,jdbcType=TINYINT},
      operator_id = #{operatorId,jdbcType=VARCHAR},
      operator_name = #{operatorName,jdbcType=VARCHAR},
      supplier_id = #{supplierId,jdbcType=VARCHAR},
      supplier_name = #{supplierName,jdbcType=VARCHAR},
      brand_id = #{brandId,jdbcType=VARCHAR},
      brand_name = #{brandName,jdbcType=VARCHAR},
      cate_level_1_id = #{cateLevel1Id,jdbcType=VARCHAR},
      cate_level_1_name = #{cateLevel1Name,jdbcType=VARCHAR},
      cate_level_2_id = #{cateLevel2Id,jdbcType=VARCHAR},
      cate_level_2_name = #{cateLevel2Name,jdbcType=VARCHAR},
      cate_level_3_id = #{cateLevel3Id,jdbcType=VARCHAR},
      cate_level_3_name = #{cateLevel3Name,jdbcType=VARCHAR},
      goods_specification = #{goodsSpecification,jdbcType=VARCHAR},
      refund_origin_order_sn = #{refundOriginOrderSn,jdbcType=VARCHAR},
      create_user_id = #{createUserId,jdbcType=VARCHAR},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=VARCHAR},
      update_user_name = #{updateUserName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      other_attribute = #{otherAttribute,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderGoods">
    update tb_operation_center_order_goods
    set biz_type_id = #{bizTypeId,jdbcType=TINYINT},
      order_goods_id = #{orderGoodsId,jdbcType=VARCHAR},
      order_sn = #{orderSn,jdbcType=VARCHAR},
      order_id = #{orderId,jdbcType=VARCHAR},
      parent_order_sn = #{parentOrderSn,jdbcType=VARCHAR},
      parent_order_id = #{parentOrderId,jdbcType=VARCHAR},
      third_party_order_sn = #{thirdPartyOrderSn,jdbcType=VARCHAR},
      biz_platform_code = #{bizPlatformCode,jdbcType=VARCHAR},
      biz_platform_name = #{bizPlatformName,jdbcType=VARCHAR},
      order_type_code = #{orderTypeCode,jdbcType=VARCHAR},
      order_type_name = #{orderTypeName,jdbcType=VARCHAR},
      order_create_time = #{orderCreateTime,jdbcType=TIMESTAMP},
      finish_time = #{finishTime,jdbcType=TIMESTAMP},
      is_package = #{isPackage,jdbcType=TINYINT},
      package_id = #{packageId,jdbcType=VARCHAR},
      package_name = #{packageName,jdbcType=VARCHAR},
      goods_type_id = #{goodsTypeId,jdbcType=TINYINT},
      goods_id = #{goodsId,jdbcType=VARCHAR},
      goods_sku = #{goodsSku,jdbcType=VARCHAR},
      goods_name = #{goodsName,jdbcType=VARCHAR},
      quantity = #{quantity,jdbcType=INTEGER},
      unit = #{unit,jdbcType=VARCHAR},
      original_unit_price = #{originalUnitPrice,jdbcType=DECIMAL},
      original_total_price = #{originalTotalPrice,jdbcType=DECIMAL},
      selling_unit_price = #{sellingUnitPrice,jdbcType=DECIMAL},
      selling_total_price = #{sellingTotalPrice,jdbcType=DECIMAL},
      negotiated_unit_price = #{negotiatedUnitPrice,jdbcType=DECIMAL},
      negotiated_total_price = #{negotiatedTotalPrice,jdbcType=DECIMAL},
      settlement_unit_price = #{settlementUnitPrice,jdbcType=DECIMAL},
      settlement_amount = #{settlementAmount,jdbcType=DECIMAL},
      cost_unit_price = #{costUnitPrice,jdbcType=DECIMAL},
      cost_total_price = #{costTotalPrice,jdbcType=DECIMAL},
      discount_amount = #{discountAmount,jdbcType=DECIMAL},
      platform_tax_code = #{platformTaxCode,jdbcType=VARCHAR},
      platform_tax_rate = #{platformTaxRate,jdbcType=DECIMAL},
      merchant_tax_code = #{merchantTaxCode,jdbcType=VARCHAR},
      merchant_tax_rate = #{merchantTaxRate,jdbcType=DECIMAL},
      is_duty_free = #{isDutyFree,jdbcType=TINYINT},
      operator_id = #{operatorId,jdbcType=VARCHAR},
      operator_name = #{operatorName,jdbcType=VARCHAR},
      supplier_id = #{supplierId,jdbcType=VARCHAR},
      supplier_name = #{supplierName,jdbcType=VARCHAR},
      brand_id = #{brandId,jdbcType=VARCHAR},
      brand_name = #{brandName,jdbcType=VARCHAR},
      cate_level_1_id = #{cateLevel1Id,jdbcType=VARCHAR},
      cate_level_1_name = #{cateLevel1Name,jdbcType=VARCHAR},
      cate_level_2_id = #{cateLevel2Id,jdbcType=VARCHAR},
      cate_level_2_name = #{cateLevel2Name,jdbcType=VARCHAR},
      cate_level_3_id = #{cateLevel3Id,jdbcType=VARCHAR},
      cate_level_3_name = #{cateLevel3Name,jdbcType=VARCHAR},
      goods_specification = #{goodsSpecification,jdbcType=VARCHAR},
      refund_origin_order_sn = #{refundOriginOrderSn,jdbcType=VARCHAR},
      create_user_id = #{createUserId,jdbcType=VARCHAR},
      create_user_name = #{createUserName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_user_id = #{updateUserId,jdbcType=VARCHAR},
      update_user_name = #{updateUserName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>

  <select id="getOrderGoodsListByOrderSn"
          resultType="cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderGoodsVO">
    SELECT t.goods_type_id goodsTypeId,t.order_goods_id orderGoodsId,
           t.goods_id goodsId,t.goods_name goodsName,
           t.goods_specification goodsSpecification,
           t.cate_level_1_name cateLevel1Name,
           t.cate_level_2_name cateLevel2Name,
           t.cate_level_3_name cateLevel3Name,
           t.quantity,
           t.unit,
           t.original_unit_price originalUnitPrice,
           t.original_total_price originalTotalPrice,
           t.discount_amount  discountAmount,
           t.selling_unit_price sellingUnitPrice,
           t.selling_total_price sellingTotalPrice,
           t.settlement_unit_price settlementUnitPrice,
           t.settlement_amount settlementAmount

    FROM tb_operation_center_order_goods t

    WHERE
       1=1
    <if test="platformCode != null and platformCode !=''">
     and  t.biz_platform_code=#{platformCode}
    </if>
    <if test="orderSn != null and orderSn !=''">
     and  t.order_sn=#{orderSn}
    </if>

    order by t.id desc


  </select>
</mapper>