select
id,
orderId,
orderNo,
orderDetailId,
buyerId,
buyerRole,
tradeType,
sellerId,
sellerRole,
payeeId,
payeeRole,
suiteId,
prodId,
prodName,
pprId,
pprName,
mateId,
mateName,
prodType,
orgProdId,
surfaceQty,
unitQty,
orderQty,
price,
returnQty,
finishTime,
orderStatus,
invoiceTime,
invoiceStatus,
invoiceBatchNo,
invoiceBillNo,
delFlag,
createUser,
createTime,
updateUser,
updateTime
from t_invoice_order
update t_invoice_order
returnQty = returnQty - #{returnQty},
updateUser = #{updateUser},
updateTime = #{updateTime},
where delFlag = '0'
and id = #{id}
and orderId = #{orderId}
and orderNo = #{orderNo}
and orderDetailId = #{orderDetailId}
and buyerId = #{buyerId}
and buyerRole = #{buyerRole}
and tradeType = #{tradeType}
and sellerId = #{sellerId}
and sellerRole = #{sellerRole}
and payeeId = #{payeeId}
and payeeRole = #{payeeRole}
and suiteId = #{suiteId}
and prodId = #{prodId}
and pprId = #{pprId}
and mateId = #{mateId}
and prodType = #{prodType}
and orgProdId = #{orgProdId}
and orderStatus = #{orderStatus}
and invoiceStatus = #{invoiceStatus}
and invoiceBatchNo = #{invoiceBatchNo}
and invoiceBillNo = #{invoiceBillNo}