From eab874580586bb589d73f61df7a4ce10252a0110 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 30 Dec 2020 15:23:58 +0800 Subject: [PATCH] modify --- zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml | 20 ++++++++++++++++++++ 1 files changed, 20 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 55ed022..e3ac372 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml @@ -68,5 +68,25 @@ </select> + <select id="selectBusinessInCome" resultType="java.util.TreeMap"> + select + <foreach collection="list" index="index" item="item" separator="," > + ( + select IFNULL(sum(ZK_TOTAL), 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=17 + </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