|
|
@@ -1133,15 +1133,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join fs_store_product_category_scrm fspcs on fspcs.cate_id = fsps.cate_id
|
|
|
left join company t3 on t1.company_id = t3.company_id
|
|
|
left join company_user t4 on t4.user_id = t1.company_user_id
|
|
|
- LEFT JOIN (
|
|
|
- SELECT
|
|
|
- t5.*,
|
|
|
- ROW_NUMBER() OVER (PARTITION BY t5.business_code ORDER BY t5.status desc,t5.create_time DESC) as rn
|
|
|
- FROM live_order_payment t5
|
|
|
- WHERE t5.business_id IS NOT NULL
|
|
|
- ) lop ON lop.business_id = t1.order_id AND lop.rn = 1
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT
|
|
|
+ sp.*,
|
|
|
+ ROW_NUMBER() OVER (PARTITION BY sp.business_code ORDER BY sp.create_time DESC) as rn
|
|
|
+ FROM live_order_payment sp
|
|
|
+ WHERE sp.business_code IS NOT NULL
|
|
|
+ ) lop ON lop.business_code = t1.order_code AND lop.rn = 1
|
|
|
<where>
|
|
|
t1.is_del = 0 and fsps.product_id IS NOT NULL
|
|
|
+ <if test="bankTransactionId != null and bankTransactionId !=''">
|
|
|
+ and lop.bank_transaction_id like CONCAT('%',#{bankTransactionId},'%')
|
|
|
+ </if>
|
|
|
<if test="orderId != null">
|
|
|
AND t1.order_id = #{orderId}
|
|
|
</if>
|