Helius
2020-08-19 eee4a9fdb1e87d25b39d9c08a7b43b09642df5ad
src/main/resources/mapper/contract/ContractHoldOrderDao.xml
@@ -52,13 +52,18 @@
    <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}
        <if test="orderType != null">
            order_type=#{orderType}
        </if>
    </select>
    <select id="selectWholeHoldOrderByOrderType" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity">
        select * from contract_hold_order
        where member_id=#{memberId} and order_type=#{OrderType}
        where member_id=#{memberId} and opening_type=#{orderType}
    </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>
</mapper>