From 1496a7e366a2796b825e7b989b82654ae1aca6b8 Mon Sep 17 00:00:00 2001 From: 姜友瑶 <935090232@qq.com> Date: Mon, 30 May 2022 20:48:03 +0800 Subject: [PATCH] fix:修复退款订单退款业绩没计算为负数问题 --- zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml index 96da104..8ab6258 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml @@ -366,6 +366,12 @@ set car_use_id=#{cardId} where vip_id=#{vipId} and type='会员充值' </update> + + <select id="selectCardUseAmount" resultType="java.lang.Double"> + select IFNULL(ABS(sum(IFNULL(total, 0))), 0) + from money_card_use_flow + where car_use_id=#{cardId} and type='消费扣款' + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1