From e423d56d730db1baed24f3f7dbbc4141038776b6 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 18 Jun 2021 22:12:03 +0800
Subject: [PATCH] 修复每日业绩bug和优化赠送业绩计算方式
---
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
index c74aeca..493f7d5 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
@@ -619,7 +619,7 @@
</select>
<select id="selectVipCardTotalMoney" resultType="java.lang.Double">
- SELECT TRUNCATE( SUM(gift_money)+SUM(real_money) ,2 ) from money_card_use where vip_id=#{vipId} and `status` ='有效'
+ SELECT IFNULL(sum(IFNULL(gift_money, 0)),0)+ IFNULL(sum(IFNULL(real_money, 0)),0) from money_card_use where vip_id=#{vipId} and `status` ='有效'
</select>
--
Gitblit v1.9.1