insert into wx_order wx_order_sn, merch_order_id, order_sn, wx_order_id, merch_sn, merch_name, plat_sn, plat_name, third_party_merch_code, third_party_merch_name, place_orderl_time, auto_send, buyer_reg_no, buyer_bill_time, buyer_id_type, buyer_id_code, buyer_name, buyer_tel, consignee_id_type, consignee_id_code, consignee_name, consignee_mob, consignee_tel, consignee_country_code, consignee_province_code, consignee_province, consignee_city_code, consignee_city, consignee_district_code, consignee_district, consignee_address, consignee_zip_code, payer_name, payer_id_type, payer_id_code, payer_mob, pay_ent_cus_code, pay_no, goods_value, freight, discount, tax_total, actural_paid, pay_time, expr_type, expr_comp_id, expr_agreement_type, decl_expr_fee, batch_numbers, decl_post_tax, shop_id, extra_tag, currency_code, ws_flag, buyer_pay_check, wx_order_detail, clec_order_status, way_order_status, project_check_status, play_order_status, remark, creater_sn, create_time, moder_sn, mod_time, tstm, ex_field, ex_field2, ex_field3, ex_field4, ex_field5, VALUES #{item.wxOrderSn,jdbcType=VARCHAR}, #{item.merchOrderId,jdbcType=VARCHAR}, #{item.orderSn,jdbcType=VARCHAR}, #{item.wxOrderId,jdbcType=VARCHAR}, #{item.merchSn,jdbcType=VARCHAR}, #{item.merchName,jdbcType=VARCHAR}, #{item.platSn,jdbcType=VARCHAR}, #{item.platName,jdbcType=VARCHAR}, #{item.thirdPartyMerchCode,jdbcType=VARCHAR}, #{item.thirdPartyMerchName,jdbcType=VARCHAR}, #{item.placeOrderlTime,jdbcType=TIMESTAMP}, #{item.autoSend,jdbcType=CHAR}, #{item.buyerRegNo,jdbcType=VARCHAR}, #{item.buyerBillTime,jdbcType=TIMESTAMP}, #{item.buyerIdType,jdbcType=VARCHAR}, #{item.buyerIdCode,jdbcType=VARCHAR}, #{item.buyerName,jdbcType=VARCHAR}, #{item.buyerTel,jdbcType=VARCHAR}, #{item.consigneeIdType,jdbcType=VARCHAR}, #{item.consigneeIdCode,jdbcType=VARCHAR}, #{item.consigneeName,jdbcType=VARCHAR}, #{item.consigneeMob,jdbcType=VARCHAR}, #{item.consigneeTel,jdbcType=VARCHAR}, #{item.consigneeCountryCode,jdbcType=VARCHAR}, #{item.consigneeProvinceCode,jdbcType=VARCHAR}, #{item.consigneeProvince,jdbcType=VARCHAR}, #{item.consigneeCityCode,jdbcType=VARCHAR}, #{item.consigneeCity,jdbcType=VARCHAR}, #{item.consigneeDistrictCode,jdbcType=VARCHAR}, #{item.consigneeDistrict,jdbcType=VARCHAR}, #{item.consigneeAddress,jdbcType=VARCHAR}, #{item.consigneeZipCode,jdbcType=VARCHAR}, #{item.payerName,jdbcType=VARCHAR}, #{item.payerIdType,jdbcType=VARCHAR}, #{item.payerIdCode,jdbcType=VARCHAR}, #{item.payerMob,jdbcType=VARCHAR}, #{item.payEntCusCode,jdbcType=VARCHAR}, #{item.payNo,jdbcType=VARCHAR}, #{item.goodsValue,jdbcType=DECIMAL}, #{item.freight,jdbcType=DECIMAL}, #{item.discount,jdbcType=DECIMAL}, #{item.taxTotal,jdbcType=DECIMAL}, #{item.acturalPaid,jdbcType=DECIMAL}, #{item.payTime,jdbcType=TIMESTAMP}, #{item.exprType,jdbcType=CHAR}, #{item.exprCompId,jdbcType=VARCHAR}, #{item.exprAgreementType,jdbcType=CHAR}, #{item.declExprFee,jdbcType=DECIMAL}, #{item.batchNumbers,jdbcType=VARCHAR}, #{item.declPostTax,jdbcType=DECIMAL}, #{item.shopId,jdbcType=VARCHAR}, #{item.extraTag,jdbcType=VARCHAR}, #{item.currencyCode,jdbcType=VARCHAR}, #{item.wsFlag,jdbcType=CHAR}, #{item.buyerPayCheck,jdbcType=CHAR}, #{item.wxOrderDetail,jdbcType=CHAR}, #{item.clecOrderStatus,jdbcType=CHAR}, #{item.wayOrderStatus,jdbcType=CHAR}, #{item.projectCheckStatus,jdbcType=CHAR}, #{item.playOrderStatus,jdbcType=CHAR}, #{item.remark,jdbcType=VARCHAR}, #{item.createrSn,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.moderSn,jdbcType=VARCHAR}, #{item.modTime,jdbcType=TIMESTAMP}, #{item.tstm,jdbcType=TIMESTAMP}, #{item.exField,jdbcType=VARCHAR}, #{item.exField2,jdbcType=VARCHAR}, #{item.exField3,jdbcType=VARCHAR}, #{item.exField4,jdbcType=VARCHAR}, #{item.exField5,jdbcType=VARCHAR}, update wx_order merch_order_id = #{item.merchOrderId,jdbcType=VARCHAR}, order_sn = #{item.orderSn,jdbcType=VARCHAR}, wx_order_id = #{item.wxOrderId,jdbcType=VARCHAR}, merch_sn = #{item.merchSn,jdbcType=VARCHAR}, merch_name = #{item.merchName,jdbcType=VARCHAR}, plat_sn = #{item.platSn,jdbcType=VARCHAR}, plat_name = #{item.platName,jdbcType=VARCHAR}, third_party_merch_code = #{item.thirdPartyMerchCode,jdbcType=VARCHAR}, third_party_merch_name = #{item.thirdPartyMerchName,jdbcType=VARCHAR}, place_orderl_time = #{item.placeOrderlTime,jdbcType=TIMESTAMP}, auto_send = #{item.autoSend,jdbcType=CHAR}, buyer_reg_no = #{item.buyerRegNo,jdbcType=VARCHAR}, buyer_bill_time = #{item.buyerBillTime,jdbcType=TIMESTAMP}, buyer_id_type = #{item.buyerIdType,jdbcType=VARCHAR}, buyer_id_code = #{item.buyerIdCode,jdbcType=VARCHAR}, buyer_name = #{item.buyerName,jdbcType=VARCHAR}, buyer_tel = #{item.buyerTel,jdbcType=VARCHAR}, consignee_id_type = #{item.consigneeIdType,jdbcType=VARCHAR}, consignee_id_code = #{item.consigneeIdCode,jdbcType=VARCHAR}, consignee_name = #{item.consigneeName,jdbcType=VARCHAR}, consignee_mob = #{item.consigneeMob,jdbcType=VARCHAR}, consignee_tel = #{item.consigneeTel,jdbcType=VARCHAR}, consignee_country_code = #{item.consigneeCountryCode,jdbcType=VARCHAR}, consignee_province_code = #{item.consigneeProvinceCode,jdbcType=VARCHAR}, consignee_province = #{item.consigneeProvince,jdbcType=VARCHAR}, consignee_city_code = #{item.consigneeCityCode,jdbcType=VARCHAR}, consignee_city = #{item.consigneeCity,jdbcType=VARCHAR}, consignee_district_code = #{item.consigneeDistrictCode,jdbcType=VARCHAR}, consignee_district = #{item.consigneeDistrict,jdbcType=VARCHAR}, consignee_address = #{item.consigneeAddress,jdbcType=VARCHAR}, consignee_zip_code = #{item.consigneeZipCode,jdbcType=VARCHAR}, payer_name = #{item.payerName,jdbcType=VARCHAR}, payer_id_type = #{item.payerIdType,jdbcType=VARCHAR}, payer_id_code = #{item.payerIdCode,jdbcType=VARCHAR}, payer_mob = #{item.payerMob,jdbcType=VARCHAR}, pay_ent_cus_code = #{item.payEntCusCode,jdbcType=VARCHAR}, pay_no = #{item.payNo,jdbcType=VARCHAR}, goods_value = #{item.goodsValue,jdbcType=DECIMAL}, freight = #{item.freight,jdbcType=DECIMAL}, discount = #{item.discount,jdbcType=DECIMAL}, tax_total = #{item.taxTotal,jdbcType=DECIMAL}, actural_paid = #{item.acturalPaid,jdbcType=DECIMAL}, pay_time = #{item.payTime,jdbcType=TIMESTAMP}, expr_type = #{item.exprType,jdbcType=CHAR}, expr_comp_id = #{item.exprCompId,jdbcType=VARCHAR}, expr_agreement_type = #{item.exprAgreementType,jdbcType=CHAR}, decl_expr_fee = #{item.declExprFee,jdbcType=DECIMAL}, batch_numbers = #{item.batchNumbers,jdbcType=VARCHAR}, decl_post_tax = #{item.declPostTax,jdbcType=DECIMAL}, shop_id = #{item.shopId,jdbcType=VARCHAR}, extra_tag = #{item.extraTag,jdbcType=VARCHAR}, currency_code = #{item.currencyCode,jdbcType=VARCHAR}, ws_flag = #{item.wsFlag,jdbcType=CHAR}, buyer_pay_check = #{item.buyerPayCheck,jdbcType=CHAR}, wx_order_detail = #{item.wxOrderDetail,jdbcType=CHAR}, clec_order_status = #{item.clecOrderStatus,jdbcType=CHAR}, way_order_status = #{item.wayOrderStatus,jdbcType=CHAR}, project_check_status = #{item.projectCheckStatus,jdbcType=CHAR}, play_order_status = #{item.playOrderStatus,jdbcType=CHAR}, remark = #{item.remark,jdbcType=VARCHAR}, creater_sn = #{item.createrSn,jdbcType=VARCHAR}, create_time = #{item.createTime,jdbcType=TIMESTAMP}, moder_sn = #{item.moderSn,jdbcType=VARCHAR}, mod_time = #{item.modTime,jdbcType=TIMESTAMP}, tstm = #{item.tstm,jdbcType=TIMESTAMP}, ex_field = #{item.exField,jdbcType=VARCHAR}, ex_field2 = #{item.exField2,jdbcType=VARCHAR}, ex_field3 = #{item.exField3,jdbcType=VARCHAR}, ex_field4 = #{item.exField4,jdbcType=VARCHAR}, ex_field5 = #{item.exField5,jdbcType=VARCHAR}, where wx_order_sn = #{item.wxOrderSn,jdbcType=VARCHAR} UPDATE wx_order when order_sn=#{i.orderSn} then #{i.wxOrderDetail} when order_sn=#{i.orderSn} then #{i.clecOrderStatus} when order_sn=#{i.orderSn} then #{i.wayOrderStatus} when order_sn=#{i.orderSn} then #{i.playOrderStatus} when order_sn=#{i.orderSn} then #{i.projectCheckStatus} when order_sn=#{i.orderSn} then #{i.buyerPayerCheck} order_sn=#{i.orderSn} UPDATE wx_order clec_order_status = #{clecOrderStatus} project_check_status = #{projectCheckStatus} way_order_status = #{wayOrderStatus} play_order_status = #{playOrderStatus} when buyer_payer_check = #{buyerPayerCheck} order_sn=#{orderSn}