From 0ca7bf5c850eaef852a6b49d4b94e8366deedb29 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 26 May 2021 15:03:51 +0800
Subject: [PATCH] 20210525  申诉

---
 src/main/resources/mapper/contract/ContractOrderDao.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/contract/ContractOrderDao.xml b/src/main/resources/mapper/contract/ContractOrderDao.xml
index 4df2c4c..49f2f97 100644
--- a/src/main/resources/mapper/contract/ContractOrderDao.xml
+++ b/src/main/resources/mapper/contract/ContractOrderDao.xml
@@ -84,11 +84,12 @@
         where member_id=#{memberId} and contract_type=2
     </select>
 
-    <select id="selectFollowOrderCntForWinRate" resultType="java.lang.Integer">
+    <select id="selectFollowOrderCntForWinRate" resultType="java.math.BigDecimal">
         select count(1)
         from contract_order a
         where member_id=#{memberId}
-        and contract_type=2 and order_type in (3,4)
+        and contract_type=2
+          and closing_time is not null
         <if test="type!=null and type==1">
             and reward_amount > 0
         </if>
@@ -128,16 +129,17 @@
     </select>
 
     <select id="selectThirtyTotalCntByMemberId" resultType="java.math.BigDecimal">
-        select sum(symbol_cnt)/2
+        select count(id)
         from contract_order
         where
               member_id=#{memberId}
           and contract_type=2
+          and closing_time is not null
           and create_time BETWEEN #{offsetDay} and #{date}
     </select>
 
     <select id="selectThirtyWinCntByMemberId" resultType="java.math.BigDecimal">
-        select sum(symbol_cnt)/2
+        select count(id)
         from contract_order
         where
         member_id=#{memberId}

--
Gitblit v1.9.1