| 
					
				 | 
			
			
				@@ -121,7 +121,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            customer_card_use_record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_card_record_recharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test=" orderNo !=null and orderNo !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 order_no = #{orderNo} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -132,7 +132,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!--根据订单号更新用户充值记录的状态--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <update id="updateCardRecordStatusByOrderNo" parameterType="com.platform.yijia.pojo.CustomerElectronicCard"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         UPDATE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            customer_card_use_record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_card_record_recharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="status !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 status = #{status} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -145,10 +145,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <!--插入用户电子会员卡的使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <insert id="insetCardUseRecord" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--插入用户电子会员卡的充值使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <insert id="insetCardUseRecordRecharge" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         INSERT INTO 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            customer_card_use_record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_card_record_recharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="orderNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 order_no, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -239,9 +239,98 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <!--查询客户电子会员卡的使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <select id="getCardUseRecordList" resultMap="CardRecordBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-         SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--插入用户电子会员卡的消费使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <insert id="insetCardUseRecordConsumption" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        INSERT INTO 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        customer_card_record_consumption 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="orderNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                customer_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="usageType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                usage_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="payType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pay_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="cardOilsType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                card_oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="balance !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                balance, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="createTime !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                create_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="orderNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{orderNo}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{unionId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{customerNo}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{customerName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="usageType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{usageType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="payType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{payType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="cardOilsType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{cardOilsType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{amt}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="balance !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{balance}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="createTime !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{createTime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{stationId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{stationName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{status}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--充值--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <sql id="Base_Column_List_recharge"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             order_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             union_id, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -258,12 +347,37 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            customer_card_use_record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_card_record_recharge 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                status ="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test=" usageType !=null and usageType !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                AND usage_type = #{usageType} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            status ="1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId !=null and stationId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND station_id = #{stationId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null and unionId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND union_id = #{unionId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY create_time DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--消费--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <sql id="Base_Column_List_consumption"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            order_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            usage_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pay_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            card_oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            create_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_card_record_consumption 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationId !=null and stationId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 AND station_id = #{stationId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -272,6 +386,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ORDER BY create_time DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询客户电子会员卡的使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="getCardUseRecordList" resultMap="CardRecordBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="usageType !=null and usageType =='consumption'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <include refid="Base_Column_List_consumption"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="usageType !=null and usageType =='recharge'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <include refid="Base_Column_List_recharge"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |