| 
					
				 | 
			
			
				@@ -8,8 +8,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="blog_openid"             jdbcType="VARCHAR"   property="blogOpenid" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="customer_no"             jdbcType="VARCHAR"   property="customerNo" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="customer_name"           jdbcType="VARCHAR"   property="customerName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <result column="balance"                 jdbcType="DECIMAL"   property="balance" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      <result column="card_type"               jdbcType="VARCHAR"   property="cardType" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <result column="amt"                     jdbcType="DECIMAL"   property="amt" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <result column="card_oils_type"               jdbcType="VARCHAR"   property="cardOilsType" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="station_id"              jdbcType="INTEGER"   property="stationId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="station_name"            jdbcType="VARCHAR"   property="stationName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="create_time"             jdbcType="TIMESTAMP" property="createTime" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -24,7 +24,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="customer_name"         jdbcType="VARCHAR"   property="customerName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="usage_type"            jdbcType="VARCHAR"   property="usageType" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="type"                  jdbcType="VARCHAR"   property="type" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <result column="oils_type"             jdbcType="VARCHAR"   property="oilsType" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="card_oils_type"        jdbcType="VARCHAR"   property="cardOilsType" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="amt"                   jdbcType="DECIMAL"   property="amt" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="present_amt"           jdbcType="DECIMAL"   property="presentAmt" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="create_time"           jdbcType="TIMESTAMP" property="createTime" /> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -32,6 +32,81 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="station_name"          jdbcType="VARCHAR"   property="stationName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--插入用户电子会员卡的使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <insert id="insetCardUseRecord" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        INSERT INTO customer_card_use_record 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="orderNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="usageType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                usage_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="type !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="cardOilsType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                card_oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="presentAmt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                present_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="createTime !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                create_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="orderNo !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{orderNo}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{unionId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{customerName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="usageType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{usageType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="type !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{type}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="cardOilsType !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{cardOilsType}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{amt}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="presentAmt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{presentAmt}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="createTime !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{create_time}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{stationId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationName !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{stationName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!--查询客户电子会员卡的使用记录--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="getCardUseRecordList" resultMap="CardRecordBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          SELECT 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -41,7 +116,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             usage_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            card_oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             present_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             create_time, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -60,34 +135,78 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 AND union_id = #{unionId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY create_time DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  <!--查询用户储蓄卡--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  <select id="getElectronicCardList" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        blog_openid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        customer_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        balance, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        card_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        create_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        recently_time 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        customer_electronic_card 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <if test="stationId !=null and stationId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-             station_id = #{stationId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <if test="unionId !=null and unionId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            AND union_id = #{unionId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询用户所拥有的储蓄卡--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="getElectronicCardList" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            blog_openid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            card_oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            create_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            recently_time 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_electronic_card 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <if test="stationId !=null and stationId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                 station_id = #{stationId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <if test="unionId !=null and unionId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND union_id = #{unionId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <if test="cardOilsType !=null and cardOilsType !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND card_oils_type = #{cardOilsType} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--获取用户用要充值电子会员卡(储蓄卡)信息--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="getElectronicCardInfo" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            blog_openid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            card_oils_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            create_time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            recently_time 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_electronic_card 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="id !=null and id !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                id = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--更新用户的电子会员卡的信息--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <update id="updateElectronicCardInfo" parameterType="com.platform.yijia.pojo.CustomerElectronicCard"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        UPDATE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_electronic_card 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="amt !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                amt = #{amt}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="recentlyTime !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                recently_time = #{recentlyTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="id !=null and id != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                id = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |