| 
					
				 | 
			
			
				@@ -149,6 +149,69 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="queryExportList" resultType="com.kmall.admin.entity.OrderEntity"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            o.*, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            u.username AS username, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            p.is_payment_send, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            p.is_ele_order_send, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            p.is_customs_send, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            g.sku, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            g.goods_name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            g.number, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            g.retail_price 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          mall_order o 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN mall_user u ON o.user_id = u.id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN mall_order_process_record p ON o.order_sn = p.order_sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Left join mall_order_goods g on o.id = g.order_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHERE 1=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="storeId != null and storeId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.store_id = #{storeId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="merchOrderSn != null and merchOrderSn.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.merch_order_sn = #{merchOrderSn} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="merchSn != null and merchSn.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.merch_sn = #{merchSn} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="orderSn != null and orderSn.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.order_sn LIKE concat('%',#{orderSn},'%') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="shippingStatus != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.shipping_status = #{shippingStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="payStatus != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.pay_status = #{payStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="orderStatus != null and orderStatus.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.order_status = #{orderStatus} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="shippingId != null and shippingId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.shipping_id = #{shippingId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="orderType != null and orderType.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.order_type = #{orderType} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="isOnfiilineOrder != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.is_onffline_order = #{isOnfiilineOrder} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="ids != null and ids.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND o.id in (${ids}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <choose> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <when test="sidx != null and sidx.trim() != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order by ${sidx} ${order} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </when> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <otherwise> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order by id desc 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </otherwise> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </choose> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="offset != null and limit != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            limit #{offset}, #{limit} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="queryTotal" resultType="int"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         select count(*) from mall_order o WHERE 1=1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <if test="storeId != null and storeId != ''"> 
			 |