id, alipay_serial, channel_id, order_id, order_subject, order_body, order_status, gmt_create, gmt_payment, gmt_refund, gmt_close, app_id, buyer_id, seller_id, total_amount, receipt_amount, point_amount, buyer_pay_amount, invoice_amount, refund_fee, record_vers, notify_url delete from alipay_order_info where id = #{id,jdbcType=BIGINT} insert into alipay_order_info (id, alipay_serial, channel_id, order_id, order_subject, order_body, order_status, gmt_create, gmt_payment, gmt_refund, gmt_close, app_id, buyer_id, seller_id, total_amount, receipt_amount, point_amount, buyer_pay_amount, invoice_amount, refund_fee, record_vers, notify_url) values (#{id,jdbcType=BIGINT}, #{alipaySerial,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, #{orderSubject,jdbcType=VARCHAR}, #{orderBody,jdbcType=VARCHAR}, #{orderStatus,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtPayment,jdbcType=TIMESTAMP}, #{gmtRefund,jdbcType=TIMESTAMP}, #{gmtClose,jdbcType=TIMESTAMP}, #{appId,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{receiptAmount,jdbcType=DECIMAL}, #{pointAmount,jdbcType=DECIMAL}, #{buyerPayAmount,jdbcType=DECIMAL}, #{invoiceAmount,jdbcType=DECIMAL}, #{refundFee,jdbcType=DECIMAL}, #{recordVers,jdbcType=INTEGER}, #{notifyUrl}) insert into alipay_order_info id, alipay_serial, channel_id, order_id, order_subject, order_body, order_status, gmt_create, gmt_payment, gmt_refund, gmt_close, app_id, buyer_id, seller_id, total_amount, receipt_amount, point_amount, buyer_pay_amount, invoice_amount, refund_fee, record_vers, notify_url, #{id,jdbcType=BIGINT}, #{alipaySerial}, #{channelId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, #{orderSubject,jdbcType=VARCHAR}, #{orderBody,jdbcType=VARCHAR}, #{orderStatus,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtPayment,jdbcType=TIMESTAMP}, #{gmtRefund,jdbcType=TIMESTAMP}, #{gmtClose,jdbcType=TIMESTAMP}, #{appId,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, #{sellerId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{receiptAmount,jdbcType=DECIMAL}, #{pointAmount,jdbcType=DECIMAL}, #{buyerPayAmount,jdbcType=DECIMAL}, #{invoiceAmount,jdbcType=DECIMAL}, #{refundFee,jdbcType=DECIMAL}, #{recordVers,jdbcType=INTEGER}, #{notifyUrl}, insert into alipay_order_info ( id, channel_id, order_id, order_subject, order_body, gmt_create, order_status, app_id, record_vers, notify_url, total_amount) select #{inst.id}, #{inst.channelId}, #{inst.orderId}, #{inst.orderSubject}, #{inst.orderBody}, #{inst.gmtCreate}, #{inst.orderStatus}, #{inst.appId}, max(record_vers) + 1, #{inst.notifyUrl}, #{inst.totalAmount} from alipay_order_info where channel_id = #{inst.channelId} and gmt_create between #{from} and #{to} group by channel_id having max(record_vers) = #{inst.recordVers} update alipay_order_info alipay_serial = #{alipaySerial}, order_subject = #{orderSubject,jdbcType=VARCHAR}, order_body = #{orderBody,jdbcType=VARCHAR}, order_status = #{orderStatus,jdbcType=VARCHAR}, gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, gmt_payment = #{gmtPayment,jdbcType=TIMESTAMP}, gmt_refund = #{gmtRefund,jdbcType=TIMESTAMP}, gmt_close = #{gmtClose,jdbcType=TIMESTAMP}, app_id = #{appId,jdbcType=VARCHAR}, buyer_id = #{buyerId,jdbcType=VARCHAR}, seller_id = #{sellerId,jdbcType=VARCHAR}, total_amount = #{totalAmount,jdbcType=DECIMAL}, receipt_amount = #{receiptAmount,jdbcType=DECIMAL}, point_amount = #{pointAmount,jdbcType=DECIMAL}, buyer_pay_amount = #{buyerPayAmount,jdbcType=DECIMAL}, invoice_amount = #{invoiceAmount,jdbcType=DECIMAL}, refund_fee = #{refundFee,jdbcType=DECIMAL}, record_vers = #{recordVers,jdbcType=INTEGER}, notify_url = #{notifyUrl}, where order_id = #{orderId} and channel_id = #{channelId} update alipay_order_info alipay_serial = #{alipaySerial}, channel_id = #{channelId,jdbcType=VARCHAR}, order_id = #{orderId,jdbcType=VARCHAR}, order_subject = #{orderSubject,jdbcType=VARCHAR}, order_body = #{orderBody,jdbcType=VARCHAR}, order_status = #{orderStatus,jdbcType=VARCHAR}, gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, gmt_payment = #{gmtPayment,jdbcType=TIMESTAMP}, gmt_refund = #{gmtRefund,jdbcType=TIMESTAMP}, gmt_close = #{gmtClose,jdbcType=TIMESTAMP}, app_id = #{appId,jdbcType=VARCHAR}, buyer_id = #{buyerId,jdbcType=VARCHAR}, seller_id = #{sellerId,jdbcType=VARCHAR}, total_amount = #{totalAmount,jdbcType=DECIMAL}, receipt_amount = #{receiptAmount,jdbcType=DECIMAL}, point_amount = #{pointAmount,jdbcType=DECIMAL}, buyer_pay_amount = #{buyerPayAmount,jdbcType=DECIMAL}, invoice_amount = #{invoiceAmount,jdbcType=DECIMAL}, refund_fee = #{refundFee,jdbcType=DECIMAL}, record_vers = #{recordVers,jdbcType=INTEGER}, notify_url = #{notifyUrl}, where id = #{id,jdbcType=BIGINT} update alipay_order_info set alipay_serial = #{alipaySerial}, channel_id = #{channelId,jdbcType=VARCHAR}, order_id = #{orderId,jdbcType=VARCHAR}, order_subject = #{orderSubject,jdbcType=VARCHAR}, order_body = #{orderBody,jdbcType=VARCHAR}, order_status = #{orderStatus,jdbcType=VARCHAR}, gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, gmt_payment = #{gmtPayment,jdbcType=TIMESTAMP}, gmt_refund = #{gmtRefund,jdbcType=TIMESTAMP}, gmt_close = #{gmtClose,jdbcType=TIMESTAMP}, app_id = #{appId,jdbcType=VARCHAR}, buyer_id = #{buyerId,jdbcType=VARCHAR}, seller_id = #{sellerId,jdbcType=VARCHAR}, total_amount = #{totalAmount,jdbcType=DECIMAL}, receipt_amount = #{receiptAmount,jdbcType=DECIMAL}, point_amount = #{pointAmount,jdbcType=DECIMAL}, buyer_pay_amount = #{buyerPayAmount,jdbcType=DECIMAL}, invoice_amount = #{invoiceAmount,jdbcType=DECIMAL}, refund_fee = #{refundFee,jdbcType=DECIMAL}, record_vers = #{recordVers,jdbcType=INTEGER}, notify_url = #{notifyUrl} where id = #{id,jdbcType=BIGINT}