From 6794d55dfc524bf534f0669e046d27d03dc4bc33 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 30 Dec 2020 21:21:30 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
index 5c73b36..2d1f072 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
@@ -132,7 +132,7 @@
 		select
 		<foreach collection="list" index="index" item="item"   separator=","  >
 			(
-			select IFNULL(sum(card_Pay), 0)
+			select IFNULL(sum(arrears), 0)
 			from sys_order
 			where STATU in ('欠款')
 			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
@@ -187,5 +187,45 @@
 		from area where id=1
 	</select>
 
+	<select id="selectCashRefund" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(cash_Pay), 0)
+			from sys_order
+			where STATU in ('退款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
+
+
+	<select id="selectCardRefund" resultType="java.util.TreeMap">
+		select
+		<foreach collection="list" index="index" item="item"   separator=","  >
+			(
+			select IFNULL(sum(card_Pay), 0)
+			from sys_order
+			where STATU in ('退款')
+			and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>
+			<if test="companyId != null and companyId != 0">
+				and company_id=#{companyId}
+			</if>
+			<if test="shopId !=null and shopId !=0 " >
+				and SHOP_ID = #{shopId}
+			</if>
+			) as t${index}
+
+		</foreach>
+		from area where id=1
+	</select>
 </mapper>
 	

--
Gitblit v1.9.1