From 143ae971fb4f79af8bfa0166f30666f193a533ef Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 09 Apr 2021 17:53:55 +0800 Subject: [PATCH] Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop --- zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 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 7a46366..deb14c6 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml @@ -523,6 +523,46 @@ from area where id=1 </select> + <select id="selectCardAmount" resultType="java.util.TreeMap"> + select + <foreach collection="list" index="index" item="item" separator="," > + ( + select IFNULL(sum(IFNULL(amount, 0)), 0) + from sys_order_flow a + inner join sys_order b on a.order_id=b.id and b.STATU!='已取消' + where a.pay_method='储值卡' and a.is_gift='N' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]> + <if test="shopId != null"> + and a.shop_id=#{shopId} + </if> + <if test="companyId != null"> + and a.company_id=#{companyId} + </if> + ) as t${index} + + </foreach> + from area where id=1 + </select> + + <select id="selectFreeAmount" resultType="java.util.TreeMap"> + select + <foreach collection="list" index="index" item="item" separator="," > + ( + select IFNULL(sum(IFNULL(amount, 0)), 0) + from sys_order_flow a + inner join sys_order b on a.order_id=b.id and b.STATU!='已取消' + where a.pay_method='储值卡' and a.is_gift='Y' and <![CDATA[ a.create_time > #{item.beginTime} and a.create_time < #{item.endTime}]]> + <if test="shopId != null"> + and a.shop_id=#{shopId} + </if> + <if test="companyId != null"> + and a.company_id=#{companyId} + </if> + ) as t${index} + + </foreach> + from area where id=1 + </select> + <select id="selectVipAchieveInPage" resultType="com.matrix.system.app.vo.VipAchieveDataShowVo"> <foreach collection="list" index="index" item="item" separator="union all" > select -- Gitblit v1.9.1