UPDATE contract_hold_order set is_can_closing = 0,batch_no=#{batchNo}
where is_can_closing=1
and id in
#{item.orderId}
select * from contract_hold_order where batch_no=#{batchNo}
update contract_hold_order set is_can_closing = 1 ,batch_no=null
where id=#{id}
select * from contract_hold_order where member_id=#{memberId} and is_can_closing=1 order by create_time desc
select * from contract_hold_order where member_id=#{memberId}
and symbol=#{symbol}
and contract_type=#{type}
and is_can_closing=1
order by create_time desc
select * from contract_hold_order where member_id=#{memberId} and id=#{id}
update contract_hold_order set is_can_closing=#{isCanClosing}
where id=#{id}
select * from contract_hold_order
select * from contract_hold_order
where position_type=#{positionType} and is_can_closing=1 and member_id=#{memberId}
select * from contract_hold_order
where member_id=#{memberId} and opening_type=#{orderType} and symbol=#{symbol}
select * from contract_hold_order where member_id=#{memberId}
and symbol=#{symbol}
and position_type=2
order by create_time desc
select
member_id,
symbol
from contract_hold_order
where position_type=2
group by member_id, symbol