From 056e8200e7c81c66ad8fba43cadab3fce022977a Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 02 Sep 2020 10:08:22 +0800 Subject: [PATCH] modify --- src/main/resources/mapper/contract/ContractHoldOrderDao.xml | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/contract/ContractHoldOrderDao.xml b/src/main/resources/mapper/contract/ContractHoldOrderDao.xml index 25f9dcb..d52e599 100644 --- a/src/main/resources/mapper/contract/ContractHoldOrderDao.xml +++ b/src/main/resources/mapper/contract/ContractHoldOrderDao.xml @@ -29,7 +29,11 @@ <if test="symbol!=null and symbol!=''"> and symbol=#{symbol} </if> + <if test="type!=null and type!=0"> + and contract_type=#{type} + </if> and is_can_closing=1 + order by create_time desc </select> <select id="selectHoldOrderByMemberIdAndId" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> @@ -44,4 +48,30 @@ <select id="selectAllHoldOrder" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> select * from contract_hold_order </select> + + <select id="selectMemberHoldOrderByPositionType" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> + select * from contract_hold_order + where position_type=#{positionType} and is_can_closing=1 and member_id=#{memberId} + </select> + + <select id="selectWholeHoldOrderByOrderType" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> + select * from contract_hold_order + where member_id=#{memberId} and opening_type=#{orderType} and symbol=#{symbol} + </select> + + <select id="selectHoldOrderListForWholeByMemberIdAndSymbol" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> + select * from contract_hold_order where member_id=#{memberId} + and symbol=#{symbol} + and position_type=2 + order by create_time desc + </select> + + <select id="selectAllWholeOrderMemberIdAndSymbol" resultType="java.util.HashMap"> + select + member_id, + symbol + from contract_hold_order + where position_type=2 + group by member_id, symbol + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1