|
|
@@ -1309,7 +1309,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join fs_store_order_item_scrm oi on o.id = oi.order_id
|
|
|
left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
|
|
|
</if>
|
|
|
- <if test="maps.appId != null and maps.appId != ''">
|
|
|
+ <if test="(maps.appId != null and maps.appId != '') or (maps.bankTransactionId != null and maps.bankTransactionId !='')">
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
@@ -1456,7 +1456,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN fs_user us ON us.user_id=o.user_id
|
|
|
LEFT JOIN company_user cu on cu.user_id=o.company_user_id
|
|
|
LEFT JOIN fs_store_order_df df on df.order_id=o.id
|
|
|
- <if test="maps.appId != null and maps.appId != ''">
|
|
|
+ <if test="(maps.appId != null and maps.appId != '') or (maps.bankTransactionId != null and maps.bankTransactionId !='')">
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
@@ -1466,6 +1466,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
) sp_latest ON sp_latest.business_code = o.order_code AND sp_latest.rn = 1
|
|
|
LEFT JOIN fs_course_play_source_config csc ON csc.appid = sp_latest.app_id
|
|
|
</if>
|
|
|
+ <if test = "maps.productName != null and maps.productName != '' ">
|
|
|
+ left join fs_store_product_scrm fsp on fsp.product_id = soi.product_id
|
|
|
+ </if>
|
|
|
<where>
|
|
|
<if test="maps.appId != null and maps.appId != ''">
|
|
|
and csc.appid = #{maps.appId}
|
|
|
@@ -1730,9 +1733,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</where>
|
|
|
${maps.params.dataScope}
|
|
|
- <if test="maps.productName != null and maps.productName != '' ">
|
|
|
- group by o.id
|
|
|
- </if>
|
|
|
+<!-- <if test="maps.productName != null and maps.productName != '' ">-->
|
|
|
+<!-- group by o.id-->
|
|
|
+<!-- </if>-->
|
|
|
order by
|
|
|
<if test="maps.sortField == 'companyUserName'">
|
|
|
cu.nick_name
|
|
|
@@ -1771,7 +1774,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join fs_store_order_item_scrm oi on o.id = oi.order_id
|
|
|
left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
|
|
|
</if>
|
|
|
- <if test="maps.appId != null and maps.appId != ''">
|
|
|
+ <if test="(maps.appId != null and maps.appId != '') or (maps.bankTransactionId != null and maps.bankTransactionId !='')">
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
@@ -1781,6 +1784,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
) sp_latest ON sp_latest.business_code = o.order_code AND sp_latest.rn = 1
|
|
|
LEFT JOIN fs_course_play_source_config csc ON csc.appid = sp_latest.app_id
|
|
|
</if>
|
|
|
+<!-- <if test="maps.bankTransactionId != null and maps.bankTransactionId !=''">-->
|
|
|
+<!-- LEFT JOIN (-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- sp.*,-->
|
|
|
+<!-- ROW_NUMBER() OVER (PARTITION BY sp.business_code ORDER BY sp.create_time DESC) as rn-->
|
|
|
+<!-- FROM fs_store_payment_scrm sp-->
|
|
|
+<!-- WHERE sp.business_code IS NOT NULL-->
|
|
|
+<!-- ) sp_latest ON sp_latest.business_order_id = o.id AND sp_latest.rn = 1-->
|
|
|
+<!-- </if>-->
|
|
|
|
|
|
<where>
|
|
|
<if test="maps.appId != null and map.appId != ''">
|
|
|
@@ -1904,9 +1916,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
</where>
|
|
|
${maps.params.dataScope}
|
|
|
- <if test="maps.productName != null and maps.productName != '' ">
|
|
|
- group by o.id
|
|
|
- </if>
|
|
|
+<!-- <if test="maps.productName != null and maps.productName != '' ">-->
|
|
|
+<!-- group by o.id-->
|
|
|
+<!-- </if>-->
|
|
|
order by o.id desc
|
|
|
</select>
|
|
|
<select id="selectAddTuiMoney" resultType="java.lang.Long">
|