| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.xcong.excoin.modules.contract.dao.ContractHoldOrderDao"> |
| | | |
| | | <select id="selectHoldOrderListByMemberIdAndSymbolTest" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> |
| | | select * from contract_hold_order where member_id=#{memberId} |
| | | <if test="type!=null and type!=0"> |
| | | and contract_type=#{type} |
| | | </if> |
| | | and is_can_closing=1 |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <update id="updateContractHoldOrderCanNotClosingByIds" parameterType="map"> |
| | | UPDATE contract_hold_order set is_can_closing = 0,batch_no=#{batchNo} |
| | | where is_can_closing=1 |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectAllWholeOrderMemberIdAndSymbol" resultType="java.util.HashMap"> |
| | | <select id="selectAllWholeOrderMemberId" resultType="java.lang.Long"> |
| | | select |
| | | member_id, |
| | | symbol |
| | | member_id |
| | | from contract_hold_order |
| | | where position_type=2 |
| | | group by member_id, symbol |
| | | where position_type=2 and is_can_closing=1 |
| | | group by member_id |
| | | </select> |
| | | |
| | | <select id="selectWholeHoldOrderSymbolsByMemberId" resultType="java.lang.String"> |