|
@@ -187,10 +187,13 @@
|
|
|
sum(case when t1.send_status = 0 and t1.order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
|
|
|
round(sum(case when t1.send_status = 1 and t1.order_status != 80 then 1 else 0 end) / sum(case when
|
|
|
send_status = 1 then 1 else 0 end), 4) as 'deliveryRadio',
|
|
|
- t1.item_commission_rate as 'itemCommissionRate'
|
|
|
+ t1.item_commission_rate as 'itemCommissionRate',
|
|
|
+ t3.ccr_value as 'ccrValue'
|
|
|
from kuaishou_supply_chain t1
|
|
|
left join kuaishou_item_bind_user t2
|
|
|
on t1.item_id = t2.item_id
|
|
|
+ left join kuaishou_item_ccr_info t3
|
|
|
+ on t1.item_id = t3.item_id
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and t1.order_create_time >= #{start}
|
|
@@ -214,7 +217,7 @@
|
|
|
|
|
|
|
|
|
<select id="itemBindList" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
- select *
|
|
|
+ select *,t3.ccr_value as 'ccrValue'
|
|
|
from (select item_id as 'itemId', item_title as 'itemTitle', user_id as 'userId', user_name as 'userName'
|
|
|
from kuaishou_item_list
|
|
|
where
|
|
@@ -248,6 +251,7 @@
|
|
|
from kuaishou_supply_chain t1
|
|
|
where order_create_time >= #{start}
|
|
|
group by item_id) t2 on t1.itemId = t2.itemId
|
|
|
+ left join kuaishou_item_ccr_info t3 on t1.itemId = t3.item_id
|
|
|
where 1 = 1
|
|
|
<if test="itemId != null and itemId != ''">
|
|
|
and t1.itemId = #{itemId}
|
|
@@ -834,10 +838,13 @@
|
|
|
sum(case when t1.send_status = 0 and t1.order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
|
|
|
round(sum(case when t1.send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when t1.order_status
|
|
|
!= 80 then 1 else 0 end) * 100, 2) as 'deliveryRadio',
|
|
|
- round(t1.item_commission_rate / 10,2) as 'itemCommissionRate'
|
|
|
+ round(t1.item_commission_rate / 10,2) as 'itemCommissionRate',
|
|
|
+ t3.ccr_value as 'ccrValue'
|
|
|
from kuaishou_supply_chain t1
|
|
|
left join kuaishou_item_bind_user t2
|
|
|
on t1.item_id = t2.item_id
|
|
|
+ left join kuaishou_item_ccr_info t3
|
|
|
+ on t1.item_id = t3.item_id
|
|
|
where 1 = 1
|
|
|
<if test="start != null and start != ''">
|
|
|
and t1.order_create_time >= #{start}
|
|
@@ -2472,7 +2479,7 @@
|
|
|
|
|
|
</select>
|
|
|
<select id="exportBindOrder" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
- select *
|
|
|
+ select *,t3.ccr_value as 'ccrValue'
|
|
|
from (select item_id as 'itemId', item_title as 'itemTitle', user_id as 'userId', user_name as 'userName'
|
|
|
from kuaishou_item_list
|
|
|
where
|
|
@@ -2496,6 +2503,8 @@
|
|
|
from kuaishou_supply_chain
|
|
|
where order_create_time >= #{start}
|
|
|
group by item_id) t2 on t1.itemId = t2.itemId
|
|
|
+ left join kuaishou_item_ccr_info t3
|
|
|
+ on t1.itemId = t3.item_id
|
|
|
where 1 = 1
|
|
|
<if test="itemId != null and itemId != ''">
|
|
|
and t1.item_id = #{itemId}
|