|  |  |  | 
|---|
|  |  |  | <!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"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="updateContractHoldOrderCanNotClosingByIds" parameterType="map"> | 
|---|
|  |  |  | UPDATE contract_hold_order set is_can_closing = 0,batch_no=#{batchNo} | 
|---|
|  |  |  | where is_can_closing=1 | 
|---|
|  |  |  | and id in | 
|---|
|  |  |  | <foreach collection="list" close=")" item="item" open="(" separator=","> | 
|---|
|  |  |  | #{item.orderId} | 
|---|
|  |  |  | </foreach> | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectContractHoldOrderByBatchNo" parameterType="string" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> | 
|---|
|  |  |  | select * from contract_hold_order where batch_no=#{batchNo} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="updateOrderIsCanClosingAndBatchNoById" parameterType="long"> | 
|---|
|  |  |  | update contract_hold_order set is_can_closing  = 1 ,batch_no=null | 
|---|
|  |  |  | where id=#{id} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectHoldOrderListByMemberId" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> | 
|---|
|  |  |  | select * from contract_hold_order where member_id=#{memberId} and is_can_closing=1 order by create_time desc | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectHoldOrderListByMemberIdAndSymbol" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> | 
|---|
|  |  |  | select * from contract_hold_order where member_id=#{memberId} | 
|---|
|  |  |  | <if test="symbol!=null and symbol!=''"> | 
|---|
|  |  |  | and symbol=#{symbol} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | and is_can_closing=1 | 
|---|
|  |  |  | order by create_time desc | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectHoldOrderByMemberIdAndId" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> | 
|---|
|  |  |  | select * from contract_hold_order where member_id=#{memberId} and id=#{id} | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="updateHoldOrderIsCanClosingById"> | 
|---|
|  |  |  | update contract_hold_order set is_can_closing=#{isCanClosing} | 
|---|
|  |  |  | where id=#{id} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="selectAllHoldOrder" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> | 
|---|
|  |  |  | select * from contract_hold_order | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|