|
|
@@ -1298,10 +1298,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
- ROW_NUMBER() OVER (PARTITION BY sp.business_code ORDER BY sp.create_time DESC) as rn
|
|
|
+ ROW_NUMBER() OVER (PARTITION BY sp.order_id 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_code = o.order_code AND sp_latest.rn = 1
|
|
|
+ WHERE sp.order_id IS NOT NULL
|
|
|
+ ) sp_latest ON sp_latest.order_id = o.id AND sp_latest.rn = 1
|
|
|
LEFT JOIN fs_course_play_source_config csc ON csc.appid = sp_latest.app_id
|
|
|
</if>
|
|
|
<where>
|
|
|
@@ -1445,10 +1445,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
- ROW_NUMBER() OVER (PARTITION BY sp.business_code ORDER BY sp.create_time DESC) as rn
|
|
|
+ ROW_NUMBER() OVER (PARTITION BY sp.order_id 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_code = o.order_code AND sp_latest.rn = 1
|
|
|
+ WHERE sp.order_id IS NOT NULL
|
|
|
+ ) sp_latest ON sp_latest.order_id = o.id 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 != '' ">
|
|
|
@@ -1597,10 +1597,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
- ROW_NUMBER() OVER (PARTITION BY sp.business_code ORDER BY sp.create_time DESC) as rn
|
|
|
+ ROW_NUMBER() OVER (PARTITION BY sp.order_id 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
|
|
|
+ WHERE sp.order_id IS NOT NULL
|
|
|
+ ) sp_latest ON sp_latest.order_id = o.id AND sp_latest.rn = 1
|
|
|
LEFT JOIN fs_course_play_source_config csc ON csc.appid = sp_latest.app_id
|
|
|
<where>
|
|
|
<if test="maps.appId != null and maps.appId != ''">
|
|
|
@@ -1764,10 +1764,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
sp.*,
|
|
|
- ROW_NUMBER() OVER (PARTITION BY sp.business_code ORDER BY sp.create_time DESC) as rn
|
|
|
+ ROW_NUMBER() OVER (PARTITION BY sp.order_id 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_code = o.order_code AND sp_latest.rn = 1
|
|
|
+ WHERE sp.order_id IS NOT NULL
|
|
|
+ ) sp_latest ON sp_latest.order_id = o.id 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 !=''">-->
|