Helius
2020-09-02 056e8200e7c81c66ad8fba43cadab3fce022977a
src/main/resources/mapper/contract/ContractHoldOrderDao.xml
@@ -56,14 +56,22 @@
    <select id="selectWholeHoldOrderByOrderType" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity">
        select * from contract_hold_order
        where member_id=#{memberId} and opening_type=#{orderType}
        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
        and is_can_closing=1
        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>