|
@@ -70,9 +70,10 @@
|
|
|
FROM
|
|
|
(
|
|
|
SELECT
|
|
|
- *
|
|
|
+ soi.*
|
|
|
FROM
|
|
|
tb_rst_sales_order_info soi
|
|
|
+ LEFT JOIN tb_rst_sales_order_item oi ON soi.sales_id = oi.item_order_id
|
|
|
<where>
|
|
|
<if test="salesIsDownload !=null and salesIsDownload !=''">
|
|
|
AND sales_is_download = #{salesIsDownload}
|
|
@@ -119,9 +120,6 @@
|
|
|
<if test="salesAddressInfo !=null and salesAddressInfo !=''">
|
|
|
AND sales_address_info like CONCAT('%',#{salesAddressInfo},'%')
|
|
|
</if>
|
|
|
- <if test="itemProductName !=null and itemProductName !=''">
|
|
|
- AND oi.item_product_color like CONCAT('%',#{itemProductName},'%')
|
|
|
- </if>
|
|
|
<if test="startDate != null and startDate != ''">
|
|
|
AND sales_create_time <![CDATA[>=]]> #{startDate}
|
|
|
</if>
|
|
@@ -134,6 +132,9 @@
|
|
|
<if test="salesAddType != null ">
|
|
|
AND sales_add_type = #{salesAddType}
|
|
|
</if>
|
|
|
+ <if test="itemProductName !=null and itemProductName !=''">
|
|
|
+ AND oi.item_product_color like CONCAT('%',#{itemProductName},'%') OR oi.item_product_name LIKE CONCAT('%',#{itemProductName},'%')
|
|
|
+ </if>
|
|
|
<if test="salesIds != null and salesIds != ''">
|
|
|
AND sales_id IN
|
|
|
<foreach collection="salesIds" item="node" index="index" separator="," open="(" close=")">
|
|
@@ -151,7 +152,6 @@
|
|
|
LEFT JOIN tb_rst_store_info trsi ON temp.sales_store_id = trsi.store_id
|
|
|
LEFT JOIN tb_rst_order_batch od ON temp.sales_batch_id = od.batch_id
|
|
|
LEFT JOIN tb_rst_customer_info ci ON temp.sales_customer_id = ci.customer_id
|
|
|
- LEFT JOIN tb_rst_sales_order_item oi ON temp.sales_id = oi.item_order_id
|
|
|
</select>
|
|
|
|
|
|
<!-- 订单集合 -->
|