From 3317e26dc0e82bc0eb811cb1c5cf9f754aa8cba3 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Tue, 13 Apr 2021 10:23:21 +0800
Subject: [PATCH] 修改充值卡查询接口格式

---
 zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 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 0c36b69..d9d505a 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
@@ -98,7 +98,7 @@
 			<if test="content != null and content !='' ">
 				content = #{content},
 			</if>
-			<if test="createTime != null and createTime !='' ">
+			<if test="createTime != null  ">
 				create_time = #{createTime},
 			</if>
 			<if test="vipId != null and vipId !='' ">
@@ -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,35 @@
 			</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>
 </mapper>
 
 		
\ No newline at end of file

--
Gitblit v1.9.1