| 
					
				 | 
			
			
				@@ -31,18 +31,80 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="liters"                   jdbcType="DECIMAL"      property="liters" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="amt"                      jdbcType="DECIMAL"      property="amt" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <result column="union_id"                 jdbcType="VARCHAR"      property="unionId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <result column="group_id"                 jdbcType="INTEGER"      property="groupId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--集团客户信息返回结果--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <resultMap id="customerGroupBaseResultMap" type="com.platform.yijia.pojo.CustomerGroup"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="customer_id"              jdbcType="VARCHAR"      property="customerId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="union_id"                 jdbcType="VARCHAR"      property="unionId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="phone_number"             jdbcType="VARCHAR"      property="phoneNumber" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result column="group_id"                 jdbcType="INTEGER"      property="groupId" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询集团客户列--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <sql id="Base_Column_List_CustomerGroup"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        customer_id, union_id, phone_number, group_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <!--查询列--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="Base_Column_List"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id, member_id, customer_name, commend_man, member_grade, phone_number, car_number, balance, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         integral, special_car_type, regtime, station_id, station_name, cy_grade, qy_grade, cy_liters, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         qy_liters, cy_amt, qy_amt, blog_openid, mina_openid, blog_user_id, mina_user_id, oil_name, grade, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        liters, amt, union_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-   </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        liters, amt, union_id, group_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询集团下客户信息--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="selectCustomerGroup" parameterType="com.platform.yijia.pojo.CustomerGroup" resultMap="customerGroupBaseResultMap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <include refid="Base_Column_List_CustomerGroup"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_group 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null and unionId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                union_id = #{unionId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="groupId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND group_id = #{groupId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--插入集团客户信息--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <insert id="insertCustomerGroup" parameterType="com.platform.yijia.pojo.CustomerGroup"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        INSERT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            customer_group 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <trim prefix="(" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                customer_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="phoneNumber !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                phone_number, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="groupId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                group_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="customerId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{customerId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{unionId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="phoneNumber !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{phoneNumber}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="groupId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{groupId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <!--查询油站客户信息--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <select id="getCustomerManageInfo" resultMap="BaseResultMap" parameterType="com.platform.yijia.pojo.CustomerManage"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -101,6 +163,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="grade !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 grade = #{grade}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="groupId !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                group_id = #{groupId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="stationId != null and stationId !='' "> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -191,9 +256,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 grade, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="unionId !=null and unionId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                union_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                union_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="groupId !=null and groupId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                group_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -268,55 +335,12 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 #{grade, jdbcType=VARCHAR}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="unionId !=null and unionId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                #{unionId, jdbcType=VARCHAR} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{unionId, jdbcType=VARCHAR}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="groupId !=null and groupId !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                #{groupId, jdbcType=INTEGER} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <!-- 根据手机号更新客户表 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <update id="updateCustomerInfoByPhoneNumber" parameterType="com.platform.yijia.pojo.CustomerManage"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        UPDATE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        customer_manage 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="customerName !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                customer_name = #{customerName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="phoneNumber !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                phone_number = #{phoneNumber}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="regtime !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                regtime = #{regtime}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationName !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                station_name = #{stationName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="stationId !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                station_id = #{stationId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="blogUserId !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                blog_user_id = #{blogUserId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="minaUserId !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                mina_user_id = #{minaUserId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="oilName !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                oil_name = #{oilName}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="liters !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                liters = #{liters}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="amt !=null "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                amt = #{amt}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="unionId !=null and unionId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                union_id = #{unionId}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </set> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="phoneNumber !=null and phoneNumber !='' "> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                phone_number = #{phoneNumber} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |