From 183f7ace7ed8de8fe36e36b67c49b0b2ad24ac95 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 07 Aug 2020 09:56:23 +0800 Subject: [PATCH] modify --- src/main/resources/mapper/contract/ContractHoldOrderDao.xml | 33 +++++++++++++++++++++++++++++++-- 1 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/contract/ContractHoldOrderDao.xml b/src/main/resources/mapper/contract/ContractHoldOrderDao.xml index 7114022..32fbaf4 100644 --- a/src/main/resources/mapper/contract/ContractHoldOrderDao.xml +++ b/src/main/resources/mapper/contract/ContractHoldOrderDao.xml @@ -2,14 +2,14 @@ <!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="updateContractHoldOrderCanNotClosingByIds" parameterType="map" resultType="int"> + <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> - </select> + </update> <select id="selectContractHoldOrderByBatchNo" parameterType="string" resultType="com.xcong.excoin.modules.contract.entity.ContractHoldOrderEntity"> select * from contract_hold_order where batch_no=#{batchNo} @@ -19,4 +19,33 @@ 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> + <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"> + 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> \ No newline at end of file -- Gitblit v1.9.1