| 
					
				 | 
			
			
				@@ -42,6 +42,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="customer_phone"         jdbcType="VARCHAR"   property="customerPhone" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="customer_grade"         jdbcType="VARCHAR"   property="customerGrade" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="oil_type"               jdbcType="VARCHAR"   property="oilType" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <result column="payTypeName"            property="payTypeName" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <sql id="Example_Where_Clause"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,14 +107,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  <sql id="Base_Column_List_DateFormat"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    order_liters, DATE_FORMAT(pay_type, '%Y-%m-%d %H:%i:%s'), pay_way, pay_date, oil_personnel, DATE_FORMAT(created_date, '%Y-%m-%d %H:%i:%s'), order_type, station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    print_count, car_no, customer_phone, customer_grade, oil_type 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <sql id="Base_Column_List_PayTypeName_Status"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T1.order_id, T1.order_no, T1.oil_gun, T1.oil_name, T1.oil_pirce, T1.consumer_id, T1.consumer, T1.amt, T1.station_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    CASE T1.status WHEN "1" THEN "已支付" ELSE "未支付" END AS status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T1.order_liters, T1.pay_type, T1.pay_way, T1.pay_date, T1.oil_personnel, T1.created_date, T1.order_type, T1.station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T1.receivable_amt, T1.received_amt, T1.discount_amt, T1.discount_coupon_amt, T1.discount_coupon, T1.wx_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T1.zfb_amt, T1.pos_amt, T1.xj_amt, T1.didi_app_amt, T1.ty_app_amt, T1.other_amt, T1.dzk_amt, T1.score, T1.member_no, T1.member_amt, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T1.print_count, T1.car_no, T1.customer_phone, T1.customer_grade, T1.oil_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    T2.dict_label    AS payTypeName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <sql id="Base_Column_List"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <sql id="Base_Column_List"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -201,7 +204,19 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  <!--查询油品总和--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--获取支付类型列表--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="selectPayTypeList" resultType="com.platform.yijia.pojo.PayType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dict_value      AS payType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dict_label      AS payTypeName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            sys_dict_data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHERE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dict_type ="pay_type" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询油品总和--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <select id="selectSum" parameterType="com.platform.yijia.pojo.PayOrder" resultType="Map"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="groupBy !=null and groupBy =='oilName'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <include refid="Base_Column_List_oilName"/> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -290,7 +305,31 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         GROUP BY month_days 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--查询班结时间内订单--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="selectPayOrderListFormater" parameterType="com.platform.yijia.pojo.PayOrder" resultMap="BaseResultMap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <include refid="Base_Column_List_PayTypeName_Status"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    pay_order       AS T1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN   sys_dict_data   AS T2 ON T1.pay_type = T2.dict_value 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="stationId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                T1.station_id= #{stationId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="payType !=null and payType !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND T1.pay_type= #{payType} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="status !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND T1.status= #{status} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="beginTime !=null and beginTime !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND T1.pay_date >= #{beginTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="endTime !=null and endTime !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                AND T1.pay_date < #{endTime} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <!--查询班结时间内订单--> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -298,7 +337,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="Base_Column_List"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        pay_order 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                pay_order 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <if test="stationId !=null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         station_id= #{stationId} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -335,7 +374,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ORDER BY  pay_date ASC LIMIT 0,1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <!--根据用户openId和用户类型userType查询用户订单--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <select id="getOrderListByOpenIdAndUserType" parameterType="com.platform.yijia.pojo.AppUserInfo" resultType="com.platform.yijia.pojo.PayOrder"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     SELECT 
			 |