From c80fa36ef5e9cfc48a368939e61c9e89a6b5ecc8 Mon Sep 17 00:00:00 2001
From: 姜友瑶 <935090232@qq.com>
Date: Mon, 13 Jun 2022 16:29:24 +0800
Subject: [PATCH] fix:排除删除会员方法
---
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml | 45 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 43 insertions(+), 2 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 8515310..8ab6258 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
@@ -113,8 +113,8 @@
<if test="type != null and type !='' ">
type = #{type},
</if>
- <if test="taotal != null and taotal !='' ">
- taotal = #{taotal},
+ <if test="total != null and total !='' ">
+ total = #{total},
</if>
<if test="times != null and times !='' ">
times = #{times},
@@ -331,6 +331,47 @@
</if>
</if>
</select>
+
+ <select id="selectForWxInPage" resultMap="MoneyCardUseFlowMap">
+ select
+ id,
+ order_no,
+ pay_no,
+ content,
+ create_time,
+ type,
+ total,
+ times,
+ gift_money,
+ balance,
+ (SELECT su_name from sys_users a WHERE operation_id=a.su_id) staffName
+ from money_card_use_flow
+ <where>
+ and car_use_id=#{record.carUseId}
+ <if test="record.queryTime!=null and record.queryTime!=''">
+ and DATE_FORMAT(create_time,'%Y-%m')=#{record.queryTime}
+ </if>
+ <if test="record.revenueType==1">
+ and total>0
+ </if>
+ <if test="record.revenueType==2">
+ <![CDATA[ and total<0 ]]>
+ </if>
+ </where>
+ order by create_time desc
+ </select>
+
+ <update id="updateVipCardId">
+ update money_card_use_flow
+ 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