<?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.OperationCenterOrderMapper">
  <resultMap id="BaseResultMap" type="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrder">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="order_sn" jdbcType="VARCHAR" property="orderSn" />
    <result column="order_biz_type_id" jdbcType="TINYINT" property="orderBizTypeId" />
    <result column="biz_order_id" jdbcType="VARCHAR" property="bizOrderId" />
    <result column="parent_order_sn" jdbcType="VARCHAR" property="parentOrderSn" />
    <result column="parent_order_id" jdbcType="VARCHAR" property="parentOrderId" />
    <result column="order_data_type_id" jdbcType="TINYINT" property="orderDataTypeId" />
    <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="biz_source_id" jdbcType="TINYINT" property="bizSourceId" />
    <result column="biz_source_name" jdbcType="VARCHAR" property="bizSourceName" />
    <result column="biz_terminal_id" jdbcType="TINYINT" property="bizTerminalId" />
    <result column="biz_terminal_code" jdbcType="VARCHAR" property="bizTerminalCode" />
    <result column="biz_terminal_name" jdbcType="VARCHAR" property="bizTerminalName" />
    <result column="order_create_time" jdbcType="TIMESTAMP" property="orderCreateTime" />
    <result column="trading_time" jdbcType="TIMESTAMP" property="tradingTime" />
    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
    <result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
    <result column="operator_id" jdbcType="VARCHAR" property="operatorId" />
    <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
    <result column="org_id" jdbcType="VARCHAR" property="orgId" />
    <result column="org_name" jdbcType="VARCHAR" property="orgName" />
    <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
    <result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
    <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
    <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
    <result column="buyer_dept_id" jdbcType="VARCHAR" property="buyerDeptId" />
    <result column="buyer_dept_name" jdbcType="VARCHAR" property="buyerDeptName" />
    <result column="buyer_mobile" jdbcType="VARCHAR" property="buyerMobile" />
    <result column="supplier_id" jdbcType="VARCHAR" property="supplierId" />
    <result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
    <result column="order_goods_amount" jdbcType="DECIMAL" property="orderGoodsAmount" />
    <result column="order_negotiated_amount" jdbcType="DECIMAL" property="orderNegotiatedAmount" />
    <result column="order_price" jdbcType="DECIMAL" property="orderPrice" />
    <result column="order_settlement_amount" jdbcType="DECIMAL" property="orderSettlementAmount" />
    <result column="order_cost_price" jdbcType="DECIMAL" property="orderCostPrice" />
    <result column="transport_amount" jdbcType="DECIMAL" property="transportAmount" />
    <result column="merchant_transport_amount" jdbcType="DECIMAL" property="merchantTransportAmount" />
    <result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" />
    <result column="coupon_id" jdbcType="VARCHAR" property="couponId" />
    <result column="discount_desc" jdbcType="VARCHAR" property="discountDesc" />
    <result column="platform_aftersale_status_id" jdbcType="TINYINT" property="platformAftersaleStatusId" />
    <result column="platform_aftersale_type_id" jdbcType="TINYINT" property="platformAftersaleTypeId" />
    <result column="platform_aftersale_type" jdbcType="VARCHAR" property="platformAftersaleType" />
    <result column="biz_order_pay_type_id" jdbcType="VARCHAR" property="bizOrderPayTypeId" />
    <result column="biz_order_pay_type" jdbcType="VARCHAR" property="bizOrderPayType" />
    <result column="platform_pay_type_id" jdbcType="BIGINT" property="platformPayTypeId" />
    <result column="platform_pay_type" jdbcType="VARCHAR" property="platformPayType" />
    <result column="order_pay_status" jdbcType="TINYINT" property="orderPayStatus" />
    <result column="biz_order_status_id" jdbcType="VARCHAR" property="bizOrderStatusId" />
    <result column="biz_order_status_name" jdbcType="VARCHAR" property="bizOrderStatusName" />
    <result column="transaction_status_id" jdbcType="TINYINT" property="transactionStatusId" />
    <result column="order_remark" jdbcType="VARCHAR" property="orderRemark" />
    <result column="merchant_remark" jdbcType="VARCHAR" property="merchantRemark" />
    <result column="consignee" jdbcType="VARCHAR" property="consignee" />
    <result column="consignee_mobile" jdbcType="VARCHAR" property="consigneeMobile" />
    <result column="consignee_address" jdbcType="VARCHAR" property="consigneeAddress" />
    <result column="consignee_address_id" jdbcType="VARCHAR" property="consigneeAddressId" />
    <result column="province" jdbcType="VARCHAR" property="province" />
    <result column="city" jdbcType="VARCHAR" property="city" />
    <result column="county" jdbcType="VARCHAR" property="county" />
    <result column="street" jdbcType="VARCHAR" property="street" />
    <result column="address_detail" jdbcType="VARCHAR" property="addressDetail" />
    <result column="distribution_type_id" jdbcType="VARCHAR" property="distributionTypeId" />
    <result column="distribution_type" jdbcType="VARCHAR" property="distributionType" />
    <result column="express_code" jdbcType="VARCHAR" property="expressCode" />
    <result column="express_name" jdbcType="VARCHAR" property="expressName" />
    <result column="express_tracking_no" jdbcType="VARCHAR" property="expressTrackingNo" />
    <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" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
  </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_sn, order_biz_type_id, biz_order_id, parent_order_sn, parent_order_id, 
    order_data_type_id, third_party_order_sn, biz_platform_code, biz_platform_name, order_type_code, 
    order_type_name, biz_source_id, biz_source_name, biz_terminal_id, biz_terminal_code, 
    biz_terminal_name, order_create_time, trading_time, send_time, finish_time, operator_id, 
    operator_name, org_id, org_name, enterprise_id, enterprise_name, buyer_id, buyer_name, 
    buyer_dept_id, buyer_dept_name, buyer_mobile, supplier_id, supplier_name, order_goods_amount, 
    order_negotiated_amount, order_price, order_settlement_amount, order_cost_price, 
    transport_amount, merchant_transport_amount, discount_amount, coupon_id, discount_desc, 
    platform_aftersale_status_id, platform_aftersale_type_id, platform_aftersale_type, 
    biz_order_pay_type_id, biz_order_pay_type, platform_pay_type_id, platform_pay_type, 
    order_pay_status, biz_order_status_id, biz_order_status_name, transaction_status_id, 
    order_remark, merchant_remark, consignee, consignee_mobile, consignee_address, consignee_address_id, 
    province, city, county, street, address_detail, distribution_type_id, distribution_type, 
    express_code, express_name, express_tracking_no, refund_origin_order_sn, create_user_id, 
    create_user_name, create_time, update_user_id, update_user_name, update_time, deleted
  </sql>
  <select id="selectByExample" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tb_operation_center_order
    <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="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_operation_center_order
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_operation_center_order
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderExample">
    delete from tb_operation_center_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrder">
    insert into tb_operation_center_order (id, order_sn, order_biz_type_id, 
      biz_order_id, parent_order_sn, parent_order_id, 
      order_data_type_id, third_party_order_sn, biz_platform_code, 
      biz_platform_name, order_type_code, order_type_name, 
      biz_source_id, biz_source_name, biz_terminal_id, 
      biz_terminal_code, biz_terminal_name, order_create_time, 
      trading_time, send_time, finish_time, 
      operator_id, operator_name, org_id, 
      org_name, enterprise_id, enterprise_name, 
      buyer_id, buyer_name, buyer_dept_id, 
      buyer_dept_name, buyer_mobile, supplier_id, 
      supplier_name, order_goods_amount, order_negotiated_amount, 
      order_price, order_settlement_amount, order_cost_price, 
      transport_amount, merchant_transport_amount, 
      discount_amount, coupon_id, discount_desc, 
      platform_aftersale_status_id, platform_aftersale_type_id, 
      platform_aftersale_type, biz_order_pay_type_id, 
      biz_order_pay_type, platform_pay_type_id, platform_pay_type, 
      order_pay_status, biz_order_status_id, biz_order_status_name, 
      transaction_status_id, order_remark, merchant_remark, 
      consignee, consignee_mobile, consignee_address, 
      consignee_address_id, province, city, 
      county, street, address_detail, 
      distribution_type_id, distribution_type, express_code, 
      express_name, express_tracking_no, refund_origin_order_sn, 
      create_user_id, create_user_name, create_time, 
      update_user_id, update_user_name, update_time, 
      deleted)
    values (#{id,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR}, #{orderBizTypeId,jdbcType=TINYINT}, 
      #{bizOrderId,jdbcType=VARCHAR}, #{parentOrderSn,jdbcType=VARCHAR}, #{parentOrderId,jdbcType=VARCHAR}, 
      #{orderDataTypeId,jdbcType=TINYINT}, #{thirdPartyOrderSn,jdbcType=VARCHAR}, #{bizPlatformCode,jdbcType=VARCHAR}, 
      #{bizPlatformName,jdbcType=VARCHAR}, #{orderTypeCode,jdbcType=VARCHAR}, #{orderTypeName,jdbcType=VARCHAR}, 
      #{bizSourceId,jdbcType=TINYINT}, #{bizSourceName,jdbcType=VARCHAR}, #{bizTerminalId,jdbcType=TINYINT}, 
      #{bizTerminalCode,jdbcType=VARCHAR}, #{bizTerminalName,jdbcType=VARCHAR}, #{orderCreateTime,jdbcType=TIMESTAMP}, 
      #{tradingTime,jdbcType=TIMESTAMP}, #{sendTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, 
      #{operatorId,jdbcType=VARCHAR}, #{operatorName,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, 
      #{orgName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=VARCHAR}, #{enterpriseName,jdbcType=VARCHAR}, 
      #{buyerId,jdbcType=VARCHAR}, #{buyerName,jdbcType=VARCHAR}, #{buyerDeptId,jdbcType=VARCHAR}, 
      #{buyerDeptName,jdbcType=VARCHAR}, #{buyerMobile,jdbcType=VARCHAR}, #{supplierId,jdbcType=VARCHAR}, 
      #{supplierName,jdbcType=VARCHAR}, #{orderGoodsAmount,jdbcType=DECIMAL}, #{orderNegotiatedAmount,jdbcType=DECIMAL}, 
      #{orderPrice,jdbcType=DECIMAL}, #{orderSettlementAmount,jdbcType=DECIMAL}, #{orderCostPrice,jdbcType=DECIMAL}, 
      #{transportAmount,jdbcType=DECIMAL}, #{merchantTransportAmount,jdbcType=DECIMAL}, 
      #{discountAmount,jdbcType=DECIMAL}, #{couponId,jdbcType=VARCHAR}, #{discountDesc,jdbcType=VARCHAR}, 
      #{platformAftersaleStatusId,jdbcType=TINYINT}, #{platformAftersaleTypeId,jdbcType=TINYINT}, 
      #{platformAftersaleType,jdbcType=VARCHAR}, #{bizOrderPayTypeId,jdbcType=VARCHAR}, 
      #{bizOrderPayType,jdbcType=VARCHAR}, #{platformPayTypeId,jdbcType=BIGINT}, #{platformPayType,jdbcType=VARCHAR}, 
      #{orderPayStatus,jdbcType=TINYINT}, #{bizOrderStatusId,jdbcType=VARCHAR}, #{bizOrderStatusName,jdbcType=VARCHAR}, 
      #{transactionStatusId,jdbcType=TINYINT}, #{orderRemark,jdbcType=VARCHAR}, #{merchantRemark,jdbcType=VARCHAR}, 
      #{consignee,jdbcType=VARCHAR}, #{consigneeMobile,jdbcType=VARCHAR}, #{consigneeAddress,jdbcType=VARCHAR}, 
      #{consigneeAddressId,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, 
      #{county,jdbcType=VARCHAR}, #{street,jdbcType=VARCHAR}, #{addressDetail,jdbcType=VARCHAR}, 
      #{distributionTypeId,jdbcType=VARCHAR}, #{distributionType,jdbcType=VARCHAR}, #{expressCode,jdbcType=VARCHAR}, 
      #{expressName,jdbcType=VARCHAR}, #{expressTrackingNo,jdbcType=VARCHAR}, #{refundOriginOrderSn,jdbcType=VARCHAR}, 
      #{createUserId,jdbcType=VARCHAR}, #{createUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
      #{updateUserId,jdbcType=VARCHAR}, #{updateUserName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{deleted,jdbcType=TINYINT})
  </insert>
  <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrder">
    insert into tb_operation_center_order
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="orderSn != null">
        order_sn,
      </if>
      <if test="orderBizTypeId != null">
        order_biz_type_id,
      </if>
      <if test="bizOrderId != null">
        biz_order_id,
      </if>
      <if test="parentOrderSn != null">
        parent_order_sn,
      </if>
      <if test="parentOrderId != null">
        parent_order_id,
      </if>
      <if test="orderDataTypeId != null">
        order_data_type_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="bizSourceId != null">
        biz_source_id,
      </if>
      <if test="bizSourceName != null">
        biz_source_name,
      </if>
      <if test="bizTerminalId != null">
        biz_terminal_id,
      </if>
      <if test="bizTerminalCode != null">
        biz_terminal_code,
      </if>
      <if test="bizTerminalName != null">
        biz_terminal_name,
      </if>
      <if test="orderCreateTime != null">
        order_create_time,
      </if>
      <if test="tradingTime != null">
        trading_time,
      </if>
      <if test="sendTime != null">
        send_time,
      </if>
      <if test="finishTime != null">
        finish_time,
      </if>
      <if test="operatorId != null">
        operator_id,
      </if>
      <if test="operatorName != null">
        operator_name,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="orgName != null">
        org_name,
      </if>
      <if test="enterpriseId != null">
        enterprise_id,
      </if>
      <if test="enterpriseName != null">
        enterprise_name,
      </if>
      <if test="buyerId != null">
        buyer_id,
      </if>
      <if test="buyerName != null">
        buyer_name,
      </if>
      <if test="buyerDeptId != null">
        buyer_dept_id,
      </if>
      <if test="buyerDeptName != null">
        buyer_dept_name,
      </if>
      <if test="buyerMobile != null">
        buyer_mobile,
      </if>
      <if test="supplierId != null">
        supplier_id,
      </if>
      <if test="supplierName != null">
        supplier_name,
      </if>
      <if test="orderGoodsAmount != null">
        order_goods_amount,
      </if>
      <if test="orderNegotiatedAmount != null">
        order_negotiated_amount,
      </if>
      <if test="orderPrice != null">
        order_price,
      </if>
      <if test="orderSettlementAmount != null">
        order_settlement_amount,
      </if>
      <if test="orderCostPrice != null">
        order_cost_price,
      </if>
      <if test="transportAmount != null">
        transport_amount,
      </if>
      <if test="merchantTransportAmount != null">
        merchant_transport_amount,
      </if>
      <if test="discountAmount != null">
        discount_amount,
      </if>
      <if test="couponId != null">
        coupon_id,
      </if>
      <if test="discountDesc != null">
        discount_desc,
      </if>
      <if test="platformAftersaleStatusId != null">
        platform_aftersale_status_id,
      </if>
      <if test="platformAftersaleTypeId != null">
        platform_aftersale_type_id,
      </if>
      <if test="platformAftersaleType != null">
        platform_aftersale_type,
      </if>
      <if test="bizOrderPayTypeId != null">
        biz_order_pay_type_id,
      </if>
      <if test="bizOrderPayType != null">
        biz_order_pay_type,
      </if>
      <if test="platformPayTypeId != null">
        platform_pay_type_id,
      </if>
      <if test="platformPayType != null">
        platform_pay_type,
      </if>
      <if test="orderPayStatus != null">
        order_pay_status,
      </if>
      <if test="bizOrderStatusId != null">
        biz_order_status_id,
      </if>
      <if test="bizOrderStatusName != null">
        biz_order_status_name,
      </if>
      <if test="transactionStatusId != null">
        transaction_status_id,
      </if>
      <if test="orderRemark != null">
        order_remark,
      </if>
      <if test="merchantRemark != null">
        merchant_remark,
      </if>
      <if test="consignee != null">
        consignee,
      </if>
      <if test="consigneeMobile != null">
        consignee_mobile,
      </if>
      <if test="consigneeAddress != null">
        consignee_address,
      </if>
      <if test="consigneeAddressId != null">
        consignee_address_id,
      </if>
      <if test="province != null">
        province,
      </if>
      <if test="city != null">
        city,
      </if>
      <if test="county != null">
        county,
      </if>
      <if test="street != null">
        street,
      </if>
      <if test="addressDetail != null">
        address_detail,
      </if>
      <if test="distributionTypeId != null">
        distribution_type_id,
      </if>
      <if test="distributionType != null">
        distribution_type,
      </if>
      <if test="expressCode != null">
        express_code,
      </if>
      <if test="expressName != null">
        express_name,
      </if>
      <if test="expressTrackingNo != null">
        express_tracking_no,
      </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="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="orderSn != null">
        #{orderSn,jdbcType=VARCHAR},
      </if>
      <if test="orderBizTypeId != null">
        #{orderBizTypeId,jdbcType=TINYINT},
      </if>
      <if test="bizOrderId != null">
        #{bizOrderId,jdbcType=VARCHAR},
      </if>
      <if test="parentOrderSn != null">
        #{parentOrderSn,jdbcType=VARCHAR},
      </if>
      <if test="parentOrderId != null">
        #{parentOrderId,jdbcType=VARCHAR},
      </if>
      <if test="orderDataTypeId != null">
        #{orderDataTypeId,jdbcType=TINYINT},
      </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="bizSourceId != null">
        #{bizSourceId,jdbcType=TINYINT},
      </if>
      <if test="bizSourceName != null">
        #{bizSourceName,jdbcType=VARCHAR},
      </if>
      <if test="bizTerminalId != null">
        #{bizTerminalId,jdbcType=TINYINT},
      </if>
      <if test="bizTerminalCode != null">
        #{bizTerminalCode,jdbcType=VARCHAR},
      </if>
      <if test="bizTerminalName != null">
        #{bizTerminalName,jdbcType=VARCHAR},
      </if>
      <if test="orderCreateTime != null">
        #{orderCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="tradingTime != null">
        #{tradingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sendTime != null">
        #{sendTime,jdbcType=TIMESTAMP},
      </if>
      <if test="finishTime != null">
        #{finishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operatorId != null">
        #{operatorId,jdbcType=VARCHAR},
      </if>
      <if test="operatorName != null">
        #{operatorName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="orgName != null">
        #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="enterpriseId != null">
        #{enterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="enterpriseName != null">
        #{enterpriseName,jdbcType=VARCHAR},
      </if>
      <if test="buyerId != null">
        #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="buyerDeptId != null">
        #{buyerDeptId,jdbcType=VARCHAR},
      </if>
      <if test="buyerDeptName != null">
        #{buyerDeptName,jdbcType=VARCHAR},
      </if>
      <if test="buyerMobile != null">
        #{buyerMobile,jdbcType=VARCHAR},
      </if>
      <if test="supplierId != null">
        #{supplierId,jdbcType=VARCHAR},
      </if>
      <if test="supplierName != null">
        #{supplierName,jdbcType=VARCHAR},
      </if>
      <if test="orderGoodsAmount != null">
        #{orderGoodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderNegotiatedAmount != null">
        #{orderNegotiatedAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderPrice != null">
        #{orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="orderSettlementAmount != null">
        #{orderSettlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderCostPrice != null">
        #{orderCostPrice,jdbcType=DECIMAL},
      </if>
      <if test="transportAmount != null">
        #{transportAmount,jdbcType=DECIMAL},
      </if>
      <if test="merchantTransportAmount != null">
        #{merchantTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="discountAmount != null">
        #{discountAmount,jdbcType=DECIMAL},
      </if>
      <if test="couponId != null">
        #{couponId,jdbcType=VARCHAR},
      </if>
      <if test="discountDesc != null">
        #{discountDesc,jdbcType=VARCHAR},
      </if>
      <if test="platformAftersaleStatusId != null">
        #{platformAftersaleStatusId,jdbcType=TINYINT},
      </if>
      <if test="platformAftersaleTypeId != null">
        #{platformAftersaleTypeId,jdbcType=TINYINT},
      </if>
      <if test="platformAftersaleType != null">
        #{platformAftersaleType,jdbcType=VARCHAR},
      </if>
      <if test="bizOrderPayTypeId != null">
        #{bizOrderPayTypeId,jdbcType=VARCHAR},
      </if>
      <if test="bizOrderPayType != null">
        #{bizOrderPayType,jdbcType=VARCHAR},
      </if>
      <if test="platformPayTypeId != null">
        #{platformPayTypeId,jdbcType=BIGINT},
      </if>
      <if test="platformPayType != null">
        #{platformPayType,jdbcType=VARCHAR},
      </if>
      <if test="orderPayStatus != null">
        #{orderPayStatus,jdbcType=TINYINT},
      </if>
      <if test="bizOrderStatusId != null">
        #{bizOrderStatusId,jdbcType=VARCHAR},
      </if>
      <if test="bizOrderStatusName != null">
        #{bizOrderStatusName,jdbcType=VARCHAR},
      </if>
      <if test="transactionStatusId != null">
        #{transactionStatusId,jdbcType=TINYINT},
      </if>
      <if test="orderRemark != null">
        #{orderRemark,jdbcType=VARCHAR},
      </if>
      <if test="merchantRemark != null">
        #{merchantRemark,jdbcType=VARCHAR},
      </if>
      <if test="consignee != null">
        #{consignee,jdbcType=VARCHAR},
      </if>
      <if test="consigneeMobile != null">
        #{consigneeMobile,jdbcType=VARCHAR},
      </if>
      <if test="consigneeAddress != null">
        #{consigneeAddress,jdbcType=VARCHAR},
      </if>
      <if test="consigneeAddressId != null">
        #{consigneeAddressId,jdbcType=VARCHAR},
      </if>
      <if test="province != null">
        #{province,jdbcType=VARCHAR},
      </if>
      <if test="city != null">
        #{city,jdbcType=VARCHAR},
      </if>
      <if test="county != null">
        #{county,jdbcType=VARCHAR},
      </if>
      <if test="street != null">
        #{street,jdbcType=VARCHAR},
      </if>
      <if test="addressDetail != null">
        #{addressDetail,jdbcType=VARCHAR},
      </if>
      <if test="distributionTypeId != null">
        #{distributionTypeId,jdbcType=VARCHAR},
      </if>
      <if test="distributionType != null">
        #{distributionType,jdbcType=VARCHAR},
      </if>
      <if test="expressCode != null">
        #{expressCode,jdbcType=VARCHAR},
      </if>
      <if test="expressName != null">
        #{expressName,jdbcType=VARCHAR},
      </if>
      <if test="expressTrackingNo != null">
        #{expressTrackingNo,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="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrderExample" resultType="java.lang.Long">
    select count(*) from tb_operation_center_order
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tb_operation_center_order
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.orderSn != null">
        order_sn = #{record.orderSn,jdbcType=VARCHAR},
      </if>
      <if test="record.orderBizTypeId != null">
        order_biz_type_id = #{record.orderBizTypeId,jdbcType=TINYINT},
      </if>
      <if test="record.bizOrderId != null">
        biz_order_id = #{record.bizOrderId,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.orderDataTypeId != null">
        order_data_type_id = #{record.orderDataTypeId,jdbcType=TINYINT},
      </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.bizSourceId != null">
        biz_source_id = #{record.bizSourceId,jdbcType=TINYINT},
      </if>
      <if test="record.bizSourceName != null">
        biz_source_name = #{record.bizSourceName,jdbcType=VARCHAR},
      </if>
      <if test="record.bizTerminalId != null">
        biz_terminal_id = #{record.bizTerminalId,jdbcType=TINYINT},
      </if>
      <if test="record.bizTerminalCode != null">
        biz_terminal_code = #{record.bizTerminalCode,jdbcType=VARCHAR},
      </if>
      <if test="record.bizTerminalName != null">
        biz_terminal_name = #{record.bizTerminalName,jdbcType=VARCHAR},
      </if>
      <if test="record.orderCreateTime != null">
        order_create_time = #{record.orderCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.tradingTime != null">
        trading_time = #{record.tradingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.sendTime != null">
        send_time = #{record.sendTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.finishTime != null">
        finish_time = #{record.finishTime,jdbcType=TIMESTAMP},
      </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.orgId != null">
        org_id = #{record.orgId,jdbcType=VARCHAR},
      </if>
      <if test="record.orgName != null">
        org_name = #{record.orgName,jdbcType=VARCHAR},
      </if>
      <if test="record.enterpriseId != null">
        enterprise_id = #{record.enterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="record.enterpriseName != null">
        enterprise_name = #{record.enterpriseName,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerId != null">
        buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerName != null">
        buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerDeptId != null">
        buyer_dept_id = #{record.buyerDeptId,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerDeptName != null">
        buyer_dept_name = #{record.buyerDeptName,jdbcType=VARCHAR},
      </if>
      <if test="record.buyerMobile != null">
        buyer_mobile = #{record.buyerMobile,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.orderGoodsAmount != null">
        order_goods_amount = #{record.orderGoodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.orderNegotiatedAmount != null">
        order_negotiated_amount = #{record.orderNegotiatedAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.orderPrice != null">
        order_price = #{record.orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.orderSettlementAmount != null">
        order_settlement_amount = #{record.orderSettlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.orderCostPrice != null">
        order_cost_price = #{record.orderCostPrice,jdbcType=DECIMAL},
      </if>
      <if test="record.transportAmount != null">
        transport_amount = #{record.transportAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.merchantTransportAmount != null">
        merchant_transport_amount = #{record.merchantTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.discountAmount != null">
        discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
      </if>
      <if test="record.couponId != null">
        coupon_id = #{record.couponId,jdbcType=VARCHAR},
      </if>
      <if test="record.discountDesc != null">
        discount_desc = #{record.discountDesc,jdbcType=VARCHAR},
      </if>
      <if test="record.platformAftersaleStatusId != null">
        platform_aftersale_status_id = #{record.platformAftersaleStatusId,jdbcType=TINYINT},
      </if>
      <if test="record.platformAftersaleTypeId != null">
        platform_aftersale_type_id = #{record.platformAftersaleTypeId,jdbcType=TINYINT},
      </if>
      <if test="record.platformAftersaleType != null">
        platform_aftersale_type = #{record.platformAftersaleType,jdbcType=VARCHAR},
      </if>
      <if test="record.bizOrderPayTypeId != null">
        biz_order_pay_type_id = #{record.bizOrderPayTypeId,jdbcType=VARCHAR},
      </if>
      <if test="record.bizOrderPayType != null">
        biz_order_pay_type = #{record.bizOrderPayType,jdbcType=VARCHAR},
      </if>
      <if test="record.platformPayTypeId != null">
        platform_pay_type_id = #{record.platformPayTypeId,jdbcType=BIGINT},
      </if>
      <if test="record.platformPayType != null">
        platform_pay_type = #{record.platformPayType,jdbcType=VARCHAR},
      </if>
      <if test="record.orderPayStatus != null">
        order_pay_status = #{record.orderPayStatus,jdbcType=TINYINT},
      </if>
      <if test="record.bizOrderStatusId != null">
        biz_order_status_id = #{record.bizOrderStatusId,jdbcType=VARCHAR},
      </if>
      <if test="record.bizOrderStatusName != null">
        biz_order_status_name = #{record.bizOrderStatusName,jdbcType=VARCHAR},
      </if>
      <if test="record.transactionStatusId != null">
        transaction_status_id = #{record.transactionStatusId,jdbcType=TINYINT},
      </if>
      <if test="record.orderRemark != null">
        order_remark = #{record.orderRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.merchantRemark != null">
        merchant_remark = #{record.merchantRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.consignee != null">
        consignee = #{record.consignee,jdbcType=VARCHAR},
      </if>
      <if test="record.consigneeMobile != null">
        consignee_mobile = #{record.consigneeMobile,jdbcType=VARCHAR},
      </if>
      <if test="record.consigneeAddress != null">
        consignee_address = #{record.consigneeAddress,jdbcType=VARCHAR},
      </if>
      <if test="record.consigneeAddressId != null">
        consignee_address_id = #{record.consigneeAddressId,jdbcType=VARCHAR},
      </if>
      <if test="record.province != null">
        province = #{record.province,jdbcType=VARCHAR},
      </if>
      <if test="record.city != null">
        city = #{record.city,jdbcType=VARCHAR},
      </if>
      <if test="record.county != null">
        county = #{record.county,jdbcType=VARCHAR},
      </if>
      <if test="record.street != null">
        street = #{record.street,jdbcType=VARCHAR},
      </if>
      <if test="record.addressDetail != null">
        address_detail = #{record.addressDetail,jdbcType=VARCHAR},
      </if>
      <if test="record.distributionTypeId != null">
        distribution_type_id = #{record.distributionTypeId,jdbcType=VARCHAR},
      </if>
      <if test="record.distributionType != null">
        distribution_type = #{record.distributionType,jdbcType=VARCHAR},
      </if>
      <if test="record.expressCode != null">
        express_code = #{record.expressCode,jdbcType=VARCHAR},
      </if>
      <if test="record.expressName != null">
        express_name = #{record.expressName,jdbcType=VARCHAR},
      </if>
      <if test="record.expressTrackingNo != null">
        express_tracking_no = #{record.expressTrackingNo,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.deleted != null">
        deleted = #{record.deleted,jdbcType=TINYINT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tb_operation_center_order
    set id = #{record.id,jdbcType=BIGINT},
      order_sn = #{record.orderSn,jdbcType=VARCHAR},
      order_biz_type_id = #{record.orderBizTypeId,jdbcType=TINYINT},
      biz_order_id = #{record.bizOrderId,jdbcType=VARCHAR},
      parent_order_sn = #{record.parentOrderSn,jdbcType=VARCHAR},
      parent_order_id = #{record.parentOrderId,jdbcType=VARCHAR},
      order_data_type_id = #{record.orderDataTypeId,jdbcType=TINYINT},
      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},
      biz_source_id = #{record.bizSourceId,jdbcType=TINYINT},
      biz_source_name = #{record.bizSourceName,jdbcType=VARCHAR},
      biz_terminal_id = #{record.bizTerminalId,jdbcType=TINYINT},
      biz_terminal_code = #{record.bizTerminalCode,jdbcType=VARCHAR},
      biz_terminal_name = #{record.bizTerminalName,jdbcType=VARCHAR},
      order_create_time = #{record.orderCreateTime,jdbcType=TIMESTAMP},
      trading_time = #{record.tradingTime,jdbcType=TIMESTAMP},
      send_time = #{record.sendTime,jdbcType=TIMESTAMP},
      finish_time = #{record.finishTime,jdbcType=TIMESTAMP},
      operator_id = #{record.operatorId,jdbcType=VARCHAR},
      operator_name = #{record.operatorName,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=VARCHAR},
      org_name = #{record.orgName,jdbcType=VARCHAR},
      enterprise_id = #{record.enterpriseId,jdbcType=VARCHAR},
      enterprise_name = #{record.enterpriseName,jdbcType=VARCHAR},
      buyer_id = #{record.buyerId,jdbcType=VARCHAR},
      buyer_name = #{record.buyerName,jdbcType=VARCHAR},
      buyer_dept_id = #{record.buyerDeptId,jdbcType=VARCHAR},
      buyer_dept_name = #{record.buyerDeptName,jdbcType=VARCHAR},
      buyer_mobile = #{record.buyerMobile,jdbcType=VARCHAR},
      supplier_id = #{record.supplierId,jdbcType=VARCHAR},
      supplier_name = #{record.supplierName,jdbcType=VARCHAR},
      order_goods_amount = #{record.orderGoodsAmount,jdbcType=DECIMAL},
      order_negotiated_amount = #{record.orderNegotiatedAmount,jdbcType=DECIMAL},
      order_price = #{record.orderPrice,jdbcType=DECIMAL},
      order_settlement_amount = #{record.orderSettlementAmount,jdbcType=DECIMAL},
      order_cost_price = #{record.orderCostPrice,jdbcType=DECIMAL},
      transport_amount = #{record.transportAmount,jdbcType=DECIMAL},
      merchant_transport_amount = #{record.merchantTransportAmount,jdbcType=DECIMAL},
      discount_amount = #{record.discountAmount,jdbcType=DECIMAL},
      coupon_id = #{record.couponId,jdbcType=VARCHAR},
      discount_desc = #{record.discountDesc,jdbcType=VARCHAR},
      platform_aftersale_status_id = #{record.platformAftersaleStatusId,jdbcType=TINYINT},
      platform_aftersale_type_id = #{record.platformAftersaleTypeId,jdbcType=TINYINT},
      platform_aftersale_type = #{record.platformAftersaleType,jdbcType=VARCHAR},
      biz_order_pay_type_id = #{record.bizOrderPayTypeId,jdbcType=VARCHAR},
      biz_order_pay_type = #{record.bizOrderPayType,jdbcType=VARCHAR},
      platform_pay_type_id = #{record.platformPayTypeId,jdbcType=BIGINT},
      platform_pay_type = #{record.platformPayType,jdbcType=VARCHAR},
      order_pay_status = #{record.orderPayStatus,jdbcType=TINYINT},
      biz_order_status_id = #{record.bizOrderStatusId,jdbcType=VARCHAR},
      biz_order_status_name = #{record.bizOrderStatusName,jdbcType=VARCHAR},
      transaction_status_id = #{record.transactionStatusId,jdbcType=TINYINT},
      order_remark = #{record.orderRemark,jdbcType=VARCHAR},
      merchant_remark = #{record.merchantRemark,jdbcType=VARCHAR},
      consignee = #{record.consignee,jdbcType=VARCHAR},
      consignee_mobile = #{record.consigneeMobile,jdbcType=VARCHAR},
      consignee_address = #{record.consigneeAddress,jdbcType=VARCHAR},
      consignee_address_id = #{record.consigneeAddressId,jdbcType=VARCHAR},
      province = #{record.province,jdbcType=VARCHAR},
      city = #{record.city,jdbcType=VARCHAR},
      county = #{record.county,jdbcType=VARCHAR},
      street = #{record.street,jdbcType=VARCHAR},
      address_detail = #{record.addressDetail,jdbcType=VARCHAR},
      distribution_type_id = #{record.distributionTypeId,jdbcType=VARCHAR},
      distribution_type = #{record.distributionType,jdbcType=VARCHAR},
      express_code = #{record.expressCode,jdbcType=VARCHAR},
      express_name = #{record.expressName,jdbcType=VARCHAR},
      express_tracking_no = #{record.expressTrackingNo,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},
      deleted = #{record.deleted,jdbcType=TINYINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrder">
    update tb_operation_center_order
    <set>
      <if test="orderSn != null">
        order_sn = #{orderSn,jdbcType=VARCHAR},
      </if>
      <if test="orderBizTypeId != null">
        order_biz_type_id = #{orderBizTypeId,jdbcType=TINYINT},
      </if>
      <if test="bizOrderId != null">
        biz_order_id = #{bizOrderId,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="orderDataTypeId != null">
        order_data_type_id = #{orderDataTypeId,jdbcType=TINYINT},
      </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="bizSourceId != null">
        biz_source_id = #{bizSourceId,jdbcType=TINYINT},
      </if>
      <if test="bizSourceName != null">
        biz_source_name = #{bizSourceName,jdbcType=VARCHAR},
      </if>
      <if test="bizTerminalId != null">
        biz_terminal_id = #{bizTerminalId,jdbcType=TINYINT},
      </if>
      <if test="bizTerminalCode != null">
        biz_terminal_code = #{bizTerminalCode,jdbcType=VARCHAR},
      </if>
      <if test="bizTerminalName != null">
        biz_terminal_name = #{bizTerminalName,jdbcType=VARCHAR},
      </if>
      <if test="orderCreateTime != null">
        order_create_time = #{orderCreateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="tradingTime != null">
        trading_time = #{tradingTime,jdbcType=TIMESTAMP},
      </if>
      <if test="sendTime != null">
        send_time = #{sendTime,jdbcType=TIMESTAMP},
      </if>
      <if test="finishTime != null">
        finish_time = #{finishTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operatorId != null">
        operator_id = #{operatorId,jdbcType=VARCHAR},
      </if>
      <if test="operatorName != null">
        operator_name = #{operatorName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=VARCHAR},
      </if>
      <if test="orgName != null">
        org_name = #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="enterpriseId != null">
        enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
      </if>
      <if test="enterpriseName != null">
        enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
      </if>
      <if test="buyerId != null">
        buyer_id = #{buyerId,jdbcType=VARCHAR},
      </if>
      <if test="buyerName != null">
        buyer_name = #{buyerName,jdbcType=VARCHAR},
      </if>
      <if test="buyerDeptId != null">
        buyer_dept_id = #{buyerDeptId,jdbcType=VARCHAR},
      </if>
      <if test="buyerDeptName != null">
        buyer_dept_name = #{buyerDeptName,jdbcType=VARCHAR},
      </if>
      <if test="buyerMobile != null">
        buyer_mobile = #{buyerMobile,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="orderGoodsAmount != null">
        order_goods_amount = #{orderGoodsAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderNegotiatedAmount != null">
        order_negotiated_amount = #{orderNegotiatedAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderPrice != null">
        order_price = #{orderPrice,jdbcType=DECIMAL},
      </if>
      <if test="orderSettlementAmount != null">
        order_settlement_amount = #{orderSettlementAmount,jdbcType=DECIMAL},
      </if>
      <if test="orderCostPrice != null">
        order_cost_price = #{orderCostPrice,jdbcType=DECIMAL},
      </if>
      <if test="transportAmount != null">
        transport_amount = #{transportAmount,jdbcType=DECIMAL},
      </if>
      <if test="merchantTransportAmount != null">
        merchant_transport_amount = #{merchantTransportAmount,jdbcType=DECIMAL},
      </if>
      <if test="discountAmount != null">
        discount_amount = #{discountAmount,jdbcType=DECIMAL},
      </if>
      <if test="couponId != null">
        coupon_id = #{couponId,jdbcType=VARCHAR},
      </if>
      <if test="discountDesc != null">
        discount_desc = #{discountDesc,jdbcType=VARCHAR},
      </if>
      <if test="platformAftersaleStatusId != null">
        platform_aftersale_status_id = #{platformAftersaleStatusId,jdbcType=TINYINT},
      </if>
      <if test="platformAftersaleTypeId != null">
        platform_aftersale_type_id = #{platformAftersaleTypeId,jdbcType=TINYINT},
      </if>
      <if test="platformAftersaleType != null">
        platform_aftersale_type = #{platformAftersaleType,jdbcType=VARCHAR},
      </if>
      <if test="bizOrderPayTypeId != null">
        biz_order_pay_type_id = #{bizOrderPayTypeId,jdbcType=VARCHAR},
      </if>
      <if test="bizOrderPayType != null">
        biz_order_pay_type = #{bizOrderPayType,jdbcType=VARCHAR},
      </if>
      <if test="platformPayTypeId != null">
        platform_pay_type_id = #{platformPayTypeId,jdbcType=BIGINT},
      </if>
      <if test="platformPayType != null">
        platform_pay_type = #{platformPayType,jdbcType=VARCHAR},
      </if>
      <if test="orderPayStatus != null">
        order_pay_status = #{orderPayStatus,jdbcType=TINYINT},
      </if>
      <if test="bizOrderStatusId != null">
        biz_order_status_id = #{bizOrderStatusId,jdbcType=VARCHAR},
      </if>
      <if test="bizOrderStatusName != null">
        biz_order_status_name = #{bizOrderStatusName,jdbcType=VARCHAR},
      </if>
      <if test="transactionStatusId != null">
        transaction_status_id = #{transactionStatusId,jdbcType=TINYINT},
      </if>
      <if test="orderRemark != null">
        order_remark = #{orderRemark,jdbcType=VARCHAR},
      </if>
      <if test="merchantRemark != null">
        merchant_remark = #{merchantRemark,jdbcType=VARCHAR},
      </if>
      <if test="consignee != null">
        consignee = #{consignee,jdbcType=VARCHAR},
      </if>
      <if test="consigneeMobile != null">
        consignee_mobile = #{consigneeMobile,jdbcType=VARCHAR},
      </if>
      <if test="consigneeAddress != null">
        consignee_address = #{consigneeAddress,jdbcType=VARCHAR},
      </if>
      <if test="consigneeAddressId != null">
        consignee_address_id = #{consigneeAddressId,jdbcType=VARCHAR},
      </if>
      <if test="province != null">
        province = #{province,jdbcType=VARCHAR},
      </if>
      <if test="city != null">
        city = #{city,jdbcType=VARCHAR},
      </if>
      <if test="county != null">
        county = #{county,jdbcType=VARCHAR},
      </if>
      <if test="street != null">
        street = #{street,jdbcType=VARCHAR},
      </if>
      <if test="addressDetail != null">
        address_detail = #{addressDetail,jdbcType=VARCHAR},
      </if>
      <if test="distributionTypeId != null">
        distribution_type_id = #{distributionTypeId,jdbcType=VARCHAR},
      </if>
      <if test="distributionType != null">
        distribution_type = #{distributionType,jdbcType=VARCHAR},
      </if>
      <if test="expressCode != null">
        express_code = #{expressCode,jdbcType=VARCHAR},
      </if>
      <if test="expressName != null">
        express_name = #{expressName,jdbcType=VARCHAR},
      </if>
      <if test="expressTrackingNo != null">
        express_tracking_no = #{expressTrackingNo,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="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterOrder">
    update tb_operation_center_order
    set order_sn = #{orderSn,jdbcType=VARCHAR},
      order_biz_type_id = #{orderBizTypeId,jdbcType=TINYINT},
      biz_order_id = #{bizOrderId,jdbcType=VARCHAR},
      parent_order_sn = #{parentOrderSn,jdbcType=VARCHAR},
      parent_order_id = #{parentOrderId,jdbcType=VARCHAR},
      order_data_type_id = #{orderDataTypeId,jdbcType=TINYINT},
      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},
      biz_source_id = #{bizSourceId,jdbcType=TINYINT},
      biz_source_name = #{bizSourceName,jdbcType=VARCHAR},
      biz_terminal_id = #{bizTerminalId,jdbcType=TINYINT},
      biz_terminal_code = #{bizTerminalCode,jdbcType=VARCHAR},
      biz_terminal_name = #{bizTerminalName,jdbcType=VARCHAR},
      order_create_time = #{orderCreateTime,jdbcType=TIMESTAMP},
      trading_time = #{tradingTime,jdbcType=TIMESTAMP},
      send_time = #{sendTime,jdbcType=TIMESTAMP},
      finish_time = #{finishTime,jdbcType=TIMESTAMP},
      operator_id = #{operatorId,jdbcType=VARCHAR},
      operator_name = #{operatorName,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=VARCHAR},
      org_name = #{orgName,jdbcType=VARCHAR},
      enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
      enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
      buyer_id = #{buyerId,jdbcType=VARCHAR},
      buyer_name = #{buyerName,jdbcType=VARCHAR},
      buyer_dept_id = #{buyerDeptId,jdbcType=VARCHAR},
      buyer_dept_name = #{buyerDeptName,jdbcType=VARCHAR},
      buyer_mobile = #{buyerMobile,jdbcType=VARCHAR},
      supplier_id = #{supplierId,jdbcType=VARCHAR},
      supplier_name = #{supplierName,jdbcType=VARCHAR},
      order_goods_amount = #{orderGoodsAmount,jdbcType=DECIMAL},
      order_negotiated_amount = #{orderNegotiatedAmount,jdbcType=DECIMAL},
      order_price = #{orderPrice,jdbcType=DECIMAL},
      order_settlement_amount = #{orderSettlementAmount,jdbcType=DECIMAL},
      order_cost_price = #{orderCostPrice,jdbcType=DECIMAL},
      transport_amount = #{transportAmount,jdbcType=DECIMAL},
      merchant_transport_amount = #{merchantTransportAmount,jdbcType=DECIMAL},
      discount_amount = #{discountAmount,jdbcType=DECIMAL},
      coupon_id = #{couponId,jdbcType=VARCHAR},
      discount_desc = #{discountDesc,jdbcType=VARCHAR},
      platform_aftersale_status_id = #{platformAftersaleStatusId,jdbcType=TINYINT},
      platform_aftersale_type_id = #{platformAftersaleTypeId,jdbcType=TINYINT},
      platform_aftersale_type = #{platformAftersaleType,jdbcType=VARCHAR},
      biz_order_pay_type_id = #{bizOrderPayTypeId,jdbcType=VARCHAR},
      biz_order_pay_type = #{bizOrderPayType,jdbcType=VARCHAR},
      platform_pay_type_id = #{platformPayTypeId,jdbcType=BIGINT},
      platform_pay_type = #{platformPayType,jdbcType=VARCHAR},
      order_pay_status = #{orderPayStatus,jdbcType=TINYINT},
      biz_order_status_id = #{bizOrderStatusId,jdbcType=VARCHAR},
      biz_order_status_name = #{bizOrderStatusName,jdbcType=VARCHAR},
      transaction_status_id = #{transactionStatusId,jdbcType=TINYINT},
      order_remark = #{orderRemark,jdbcType=VARCHAR},
      merchant_remark = #{merchantRemark,jdbcType=VARCHAR},
      consignee = #{consignee,jdbcType=VARCHAR},
      consignee_mobile = #{consigneeMobile,jdbcType=VARCHAR},
      consignee_address = #{consigneeAddress,jdbcType=VARCHAR},
      consignee_address_id = #{consigneeAddressId,jdbcType=VARCHAR},
      province = #{province,jdbcType=VARCHAR},
      city = #{city,jdbcType=VARCHAR},
      county = #{county,jdbcType=VARCHAR},
      street = #{street,jdbcType=VARCHAR},
      address_detail = #{addressDetail,jdbcType=VARCHAR},
      distribution_type_id = #{distributionTypeId,jdbcType=VARCHAR},
      distribution_type = #{distributionType,jdbcType=VARCHAR},
      express_code = #{expressCode,jdbcType=VARCHAR},
      express_name = #{expressName,jdbcType=VARCHAR},
      express_tracking_no = #{expressTrackingNo,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},
      deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>

  <sql id="OpCenterOrder_List_Column">
    SELECT
      t.id id,
      t.operator_name operatorName,
      t.order_type_name orderTypeName,
      t.order_biz_type_id orderBizTypeId,
      t.order_sn orderSn,
      t.order_create_time orderCreateTime,
      t.order_pay_status orderPayStatus,
      t.transaction_status_id transactionStatusId,
      t.biz_order_status_name bizOrderStatusName,
      t.order_goods_amount orderGoodsAmount,
      t.transport_amount transportAmount,
      t.discount_amount discountAmount,
      t.order_price orderPrice,
      t.order_settlement_amount orderSettlementAmount,
      t.platform_pay_type platformPayType,
      t.trading_time tradingTime,
      t.send_time sendTime,
      t.finish_time finishTime,
      t.buyer_name buyerName,
      t.third_party_order_sn thirdPartyOrderSn,
      t.refund_origin_order_sn refundOriginOrderSn,
      t.platform_aftersale_status_id platformAftersaleStatusId,
      t.platform_aftersale_type platformAftersaleType,
      t.order_remark orderRemark,
      t.biz_order_pay_type_id bizOrderPayTypeId,
      t.biz_order_pay_type bizOrderPayType
  </sql>

  <select id="getOperatorCenterOrderList"
          resultType="cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderVo"
          parameterType="cn.superdesk.uniorder.dto.param.operationCenter.order.OperationCenterOrderParam">

    <include refid="OpCenterOrder_List_Column"/>

    FROM tb_operation_center_order t
    where t.deleted=0

    <include refid="getOpCenterOderListConditions"/>

    order by t.order_create_time desc

  </select>


  <sql id="getOpCenterOderListConditions">
    <if test="id != null and id != '' ">
      and t.id =#{id}
    </if>
    <if test="operatorId != null and operatorId !='' and opCenterOperatorList != null and opCenterOperatorList.size >0 ">
      and  (

      <foreach collection="opCenterOperatorList" index="index" item="operators" open="(" close=")" separator="or">
        t.operator_id=#{operators.operatorsId} and t.biz_platform_code=#{operators.bizPlatformCode}
      </foreach>

      )

    </if>


    <if test="bizPlatformCode != null and bizPlatformCode !=''">
      and t.biz_platform_code=#{bizPlatformCode}
    </if>

    <if test="orderTypeCode != null and orderTypeCode.size >0 ">
      and t.order_type_code in
       <foreach collection="orderTypeCode" index="index" item="code" open="(" close=")" separator=",">
         #{code}
       </foreach>
    </if>


    <if test="orderBizTypeId != null and orderBizTypeId.size > 0">
      and t.order_biz_type_id in
      <foreach collection="orderBizTypeId" index="index" item="typeId" open="(" close=")" separator=",">
        #{typeId}
      </foreach>
    </if>


    <if test="orderPayStatus != null and orderPayStatus.size > 0">
      and t.order_pay_status in
      <foreach collection="orderPayStatus" index="index" item="payStatus" open="(" close=")" separator=",">
        #{payStatus}
      </foreach>
    </if>

    <if test="platformPayTypeIdList != null and platformPayTypeIdList.size > 0">
      and t.platform_pay_type_id  in
      <foreach collection="platformPayTypeIdList" index="index" item="payTypeId" open="(" close=")" separator=",">
        #{payTypeId}
      </foreach>
    </if>

    <if test="transactionStatusId != null and transactionStatusId.size > 0">
      and t.transaction_status_id in
      <foreach collection="transactionStatusId"  index="index" item="transactionId" open="(" close=")" separator=",">
        #{transactionId}
      </foreach>
    </if>


    <if test="platformAftersaleStatusId != null and platformAftersaleStatusId.size > 0">
      and t.platform_aftersale_status_id in
      <foreach collection="platformAftersaleStatusId"  index="index" item="platformAftersaleStatusId" open="(" close=")" separator=",">
        #{platformAftersaleStatusId}
      </foreach>
    </if>


    <if test="platformAftersaleTypeId != null and platformAftersaleTypeId.size > 0">
      and t.platform_aftersale_type_id in
      <foreach collection="platformAftersaleTypeId"  index="index" item="platformAftersaleTypeId" open="(" close=")" separator=",">
        #{platformAftersaleTypeId}
      </foreach>
    </if>


    <if test="buyerName != null and buyerName !=''">
      and t.buyer_name=#{buyerName}
    </if>
    <if test="buyerMobile != null and buyerMobile !=''">
      and t.buyer_mobile=#{buyerMobile}
    </if>
    <if test="expressTrackingNo != null and expressTrackingNo !=''">
      and t.express_tracking_no=#{expressTrackingNo}
    </if>
    <if test="thirdPartyOrderSn != null and thirdPartyOrderSn !=''">
      and t.third_party_order_sn=#{thirdPartyOrderSn}
    </if>
    <if test="refundOriginOrderSn != null and refundOriginOrderSn !=''">
      and t.refund_origin_order_sn=#{refundOriginOrderSn}
    </if>
    <if test="orderSn != null and orderSn !=''">
      and ( t.order_sn = #{orderSn} or t.refund_origin_order_sn=#{orderSn}
       or  t.order_sn in (
      SELECT
      refund_origin_order_sn
      FROM tb_operation_center_order WHERE order_sn = #{orderSn})
      )
    </if>

    <if test="orderBeginTime != null and orderBeginTime !=''">
      and t.order_create_time <![CDATA[ >= ]]> concat(#{orderBeginTime},' 00:00:00')
    </if>
    <if test="orderEndTime != null and orderEndTime !=''">
      and t.order_create_time <![CDATA[ <= ]]> concat(#{orderEndTime},' 23:59:59')
    </if>


    <!--  支付时间 -->
    <if test="tradingBeginTime != null and tradingBeginTime !=''">
      and  t.trading_time <![CDATA[ >= ]]> concat(#{tradingBeginTime},' 00:00:00')
    </if>
    <if test="tradingEndTime != null and tradingEndTime !=''">
      and  t.trading_time <![CDATA[ <= ]]> concat(#{tradingEndTime},' 23:59:59')
    </if>


    <!--  发货时间 -->
    <if test="sendBeginTime != null and sendBeginTime !=''">
      and t.send_time <![CDATA[ >= ]]> concat(#{sendBeginTime},' 00:00:00')
    </if>
    <if test="sendEndTime != null and sendEndTime !=''">
      and t.send_time <![CDATA[ <= ]]> concat(#{sendEndTime},' 23:59:59')
    </if>
    <!--  完成时间 -->
    <if test="finishBeginTime != null and finishBeginTime !=''">
      and t.finish_time  <![CDATA[ >= ]]> concat(#{finishBeginTime},' 00:00:00')
    </if>
    <if test="finishEndTime != null and finishEndTime !=''">
      and t.finish_time <![CDATA[ <= ]]>  concat(#{finishEndTime},' 23:59:59')
    </if>

  </sql>



  <select id="getOrderStatisticsCount" resultType="java.util.Map" parameterType="cn.superdesk.uniorder.dto.param.operationCenter.order.OperationCenterOrderParam">
    SELECT count(1) orderCount,
    SUM(IFNULL(order_goods_amount,0)) orderGoodsAmountCount,
    SUM(IFNULL(transport_amount,0)) transportAmountCount,
    SUM(IFNULL(discount_amount,0)) discountAmountCount,
    SUM(IFNULL(order_price,0)) orderPriceCount,
    SUM(IFNULL(order_settlement_amount,0)) orderSettlementAmountCount

    FROM tb_operation_center_order t
    where t.deleted=0
    <include refid="getOpCenterOderListConditions"/>
  </select>





  <select id="getOrderByOrderNo"
          resultType="cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderVo">

    <include refid="OpCenterOrder_List_Column"/>

    FROM tb_operation_center_order t
    where t.deleted=0
    <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>
    <if test="refundOriginOrderSn != null and refundOriginOrderSn !=''">
      and  t.refund_origin_order_sn=#{refundOriginOrderSn}
    </if>
    order by t.order_create_time

  </select>
  <select id="getExcelOpCenterOrderList"
         resultMap="OrderDetailResultMap"
          parameterType="cn.superdesk.uniorder.dto.param.operationCenter.order.OperationCenterOrderParam">
    SELECT
        t.id,
    t.order_biz_type_id,
    t.order_type_name,
    t.order_sn,
    t.parent_order_sn,
    t.third_party_order_sn,
    t.order_create_time,
    t.trading_time,
    t.send_time,
    t.finish_time,

    t.order_goods_amount,
    t.transport_amount,
    t.discount_amount,
    t.order_price,
    t.order_settlement_amount,

    t.transaction_status_id,
    t.biz_order_status_name,

    t.operator_name,
    t.org_name,
    t.enterprise_name,
    t.buyer_id,
    t.buyer_name,
    t.buyer_mobile,

    t.platform_pay_type,
    t.order_pay_status,

    t.consignee,
    t.consignee_mobile,
    t.consignee_address,
    t.express_name,
    t.express_tracking_no,
    t.order_remark,

    t.platform_aftersale_status_id,
    t.platform_aftersale_type,
    t.refund_origin_order_sn,
    t.biz_platform_name,

    t1.biz_type_id,
    t1.order_type_name,
    t1.order_goods_id,

    t1.order_sn orderSn,
    t1.parent_order_sn parentOrderSn,
    t1.third_party_order_sn thirdOrderSn,
    t1.order_create_time orderCreateTimes,
    t1.finish_time finishTime,

    t1.goods_type_id,
    t1.goods_id,
    t1.goods_sku,
    t1.goods_name,
    t1.goods_specification,
    t1.quantity,
    t1.unit,
    t1.original_unit_price,
    t1.original_total_price,
    t1.discount_amount discountAmount,
    t1.selling_unit_price,
    t1.selling_total_price,
    t1.settlement_unit_price,
    t1.settlement_amount,

    t1.cate_level_1_name,
    t1.cate_level_2_name,
    t1.cate_level_3_name,

    t1.platform_tax_code,
    t1.platform_tax_rate

    FROM
      tb_operation_center_order t
        LEFT JOIN
      tb_operation_center_order_goods t1
      ON
        t.order_sn = t1.order_sn
    where t.deleted=0

    <include refid="getOpCenterOderListConditions"/>

    order by t.order_create_time

  </select>
  <resultMap id="OrderDetailResultMap" type="cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderDetailsVo">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="order_biz_type_id" jdbcType="TINYINT" property="orderBizTypeId" />
    <result column="order_type_name" jdbcType="VARCHAR" property="orderTypeName" />

    <result column="order_sn" jdbcType="VARCHAR" property="orderSn" />

    <result column="parent_order_sn" jdbcType="VARCHAR" property="parentOrderSn" />
    <result column="third_party_order_sn" jdbcType="VARCHAR" property="thirdPartyOrderSn" />


    <result column="order_create_time" jdbcType="TIMESTAMP" property="orderCreateTime" />
    <result column="trading_time" jdbcType="TIMESTAMP" property="tradingTime" />
    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
    <result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />

    <result column="order_goods_amount" jdbcType="DECIMAL" property="orderGoodsAmount" />
    <result column="order_price" jdbcType="DECIMAL" property="orderPrice" />
    <result column="order_settlement_amount" jdbcType="DECIMAL" property="orderSettlementAmount" />
    <result column="transport_amount" jdbcType="DECIMAL" property="transportAmount" />
    <result column="discount_amount" jdbcType="DECIMAL" property="discountAmount" />


    <result column="transaction_status_id" jdbcType="TINYINT" property="transactionStatusId" />
    <result column="biz_order_status_name" jdbcType="VARCHAR" property="bizOrderStatusName" />


    <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
    <result column="org_name" jdbcType="VARCHAR" property="orgName" />
    <result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
    <result column="buyer_id" jdbcType="VARCHAR" property="buyerId" />
    <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
    <result column="buyer_mobile" jdbcType="VARCHAR" property="buyerMobile" />


    <result column="platform_pay_type" jdbcType="VARCHAR" property="platformPayType" />
    <result column="order_pay_status" jdbcType="TINYINT" property="orderPayStatus" />


    <result column="consignee" jdbcType="VARCHAR" property="consignee" />
    <result column="consignee_mobile" jdbcType="VARCHAR" property="consigneeMobile" />
    <result column="consignee_address" jdbcType="VARCHAR" property="consigneeAddress" />

    <result column="express_name" jdbcType="VARCHAR" property="expressName" />
    <result column="express_tracking_no" jdbcType="VARCHAR" property="expressTrackingNo" />
    <result column="order_remark" jdbcType="VARCHAR" property="orderRemark" />


    <result column="platform_aftersale_status_id" jdbcType="TINYINT" property="platformAftersaleStatusId" />
    <result column="platform_aftersale_type" jdbcType="VARCHAR" property="platformAftersaleType" />

    <result column="refund_origin_order_sn" jdbcType="VARCHAR" property="refundOriginOrderSn" />

    <result column="biz_platform_name" jdbcType="VARCHAR" property="bizPlatformName" />
    <collection property="operationCenterOrderGoodsVOList" ofType="cn.superdesk.uniorder.dto.vo.operationCenter.order.OperationCenterOrderGoodsVO">

      <result column="biz_type_id" jdbcType="TINYINT" property="bizTypeId" />
      <result column="order_type_name" jdbcType="VARCHAR" property="orderTypeName" />
      <result column="order_goods_id" jdbcType="VARCHAR" property="orderGoodsId" />

      <result column="orderSn" jdbcType="VARCHAR" property="orderSn" />
      <result column="parentOrderSn" jdbcType="VARCHAR" property="parentOrderSn" />
      <result column="thirdOrderSn" jdbcType="VARCHAR" property="thirdPartyOrderSn" />
      <result column="orderCreateTimes" jdbcType="TIMESTAMP" property="orderCreateTime" />
      <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
      <result column="finishTime" jdbcType="TIMESTAMP" property="finishTime" />

      <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="goods_specification" jdbcType="VARCHAR" property="goodsSpecification" />
      <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="settlement_unit_price" jdbcType="DECIMAL" property="settlementUnitPrice" />
      <result column="settlement_amount" jdbcType="DECIMAL" property="settlementAmount" />
      <result column="discountAmount" jdbcType="DECIMAL" property="discountAmount" />

      <result column="cate_level_1_name" jdbcType="VARCHAR" property="cateLevel1Name" />
      <result column="cate_level_2_name" jdbcType="VARCHAR" property="cateLevel2Name" />
      <result column="cate_level_3_name" jdbcType="VARCHAR" property="cateLevel3Name" />

      <result column="platform_tax_code" jdbcType="VARCHAR" property="platformTaxCode" />
      <result column="platform_tax_rate" jdbcType="DECIMAL" property="platformTaxRate" />


      <result column="platform_aftersale_type" jdbcType="VARCHAR" property="platformAftersaleType" />

      <result column="refund_origin_order_sn" jdbcType="VARCHAR" property="refundOriginOrderSn" />
      <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
      <result column="biz_platform_name" jdbcType="VARCHAR" property="bizPlatformName" />


    </collection>


  </resultMap>

</mapper>