From bf68aa759bc3c0a858d80cb3d1ae1f1682cd6c94 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Tue, 06 Apr 2021 15:38:42 +0800 Subject: [PATCH] Merge branch 'activity' of http://120.27.238.55:7000/r/exchange into activity --- src/main/resources/mapper/contract/ContractOrderDao.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/contract/ContractOrderDao.xml b/src/main/resources/mapper/contract/ContractOrderDao.xml index 4e8d023..4df2c4c 100644 --- a/src/main/resources/mapper/contract/ContractOrderDao.xml +++ b/src/main/resources/mapper/contract/ContractOrderDao.xml @@ -126,4 +126,41 @@ closing_type IN (4, 5) and member_id=#{memberId} </select> + + <select id="selectThirtyTotalCntByMemberId" resultType="java.math.BigDecimal"> + select sum(symbol_cnt)/2 + from contract_order + where + member_id=#{memberId} + and contract_type=2 + and create_time BETWEEN #{offsetDay} and #{date} + </select> + + <select id="selectThirtyWinCntByMemberId" resultType="java.math.BigDecimal"> + select sum(symbol_cnt)/2 + from contract_order + where + member_id=#{memberId} + and contract_type=2 + and create_time BETWEEN #{offsetDay} and #{date} + and reward_ratio > 0 + </select> + + <select id="selectThirtyMaxRatioByMemberId" resultType="java.math.BigDecimal"> + select MAX(reward_ratio)*100 + from contract_order + where + member_id=#{memberId} + and contract_type=2 + and create_time BETWEEN #{offsetDay} and #{date} + </select> + + <select id="selectThirtyMinRatioByMemberId" resultType="java.math.BigDecimal"> + select MIN(reward_ratio)*100 + from contract_order + where + member_id=#{memberId} + and contract_type=2 + and create_time BETWEEN #{offsetDay} and #{date} + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1