From 8a57b3a0ee3fa70e8d43eb12865f1c27d0d385d8 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期三, 01 四月 2020 14:55:58 +0800
Subject: [PATCH] Merge branch 'div-1' into div

---
 fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackDetailMapper.xml |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackDetailMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackDetailMapper.xml
index 52ad300..4d14f4d 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackDetailMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/redpack/RedPackDetailMapper.xml
@@ -241,4 +241,18 @@
 			AND t.`rpd_type` = 'deduct'
 		</if>
   </select>
+  
+  <select id="countNumByDay" resultType="Long">
+ 	 SELECT COUNT(d.`rpd_id`) FROM `yeshi_ec_red_pack_detail` d
+	 WHERE d.`rpd_money` > 0 AND d.`rpd_type` NOT IN ('refund','giveOthersFail','shopOrderDrawBack','redExchangeReject')
+  		   AND TO_DAYS( d.`rpd_create_time`) = TO_DAYS(#{preDay})
+  </select>
+  
+  
+  <select id="countMoneyByDay" resultType="BigDecimal">
+ 	 SELECT SUM(d.`rpd_money`)  FROM `yeshi_ec_red_pack_detail` d
+	 WHERE d.`rpd_money` > 0 AND d.`rpd_type` NOT IN ('refund','giveOthersFail','shopOrderDrawBack','redExchangeReject')
+  		   AND TO_DAYS( d.`rpd_create_time`) = TO_DAYS(#{preDay})
+  </select>
+  
 </mapper>

--
Gitblit v1.8.0