|
@@ -8,6 +8,13 @@
|
|
|
value
|
|
|
(#{itemId},#{userId},#{nikeName})
|
|
|
</insert>
|
|
|
+ <update id="updateOrder">
|
|
|
+
|
|
|
+ update kuaishou_supply_chain set order_status = #{cpsOrderStatus}
|
|
|
+ where oid = #{oid}
|
|
|
+
|
|
|
+
|
|
|
+ </update>
|
|
|
<delete id="unbindUser" parameterType="java.lang.Long">
|
|
|
delete
|
|
|
from kuaishou_item_bind_user
|
|
@@ -156,7 +163,8 @@
|
|
|
sum(case when t1.order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
|
round(sum(case when t1.order_status != 80 then 1 else 0 end) / count(t1.oid), 4) as 'validRadio',
|
|
|
sum(case when t1.send_status = 1 then 1 else 0 end) as 'deliveryNum',
|
|
|
- round(sum(case when t1.send_status = 1 and t1.order_status != 80 then 1 else 0 end) / sum(case when t1.order_status != 80
|
|
|
+ round(sum(case when t1.send_status = 1 and t1.order_status != 80 then 1 else 0 end) / sum(case when
|
|
|
+ t1.order_status != 80
|
|
|
then 1 else 0 end),4) as 'shippingGreen',
|
|
|
sum(case when t1.send_status = 1 and t1.order_status != 80 then 1 else 0 end) as 'effDeliveryNum',
|
|
|
sum(case when t1.send_status = 0 and t1.order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
|
|
@@ -888,7 +896,8 @@
|
|
|
sum(case when t2.order_status != 80 then 1 else 0 end) as 'validOrderNUm',
|
|
|
round(sum(case when t2.order_status != 80 then 1 else 0 end) / count(t2.oid),4) as 'validRadio',
|
|
|
sum(case when t2.send_status = 1 then 1 else 0 end) as 'deliveryNum',
|
|
|
- round(sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) / sum(case when t2.order_status != 80
|
|
|
+ round(sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) / sum(case when
|
|
|
+ t2.order_status != 80
|
|
|
then 1 else 0 end),4) as 'shippingGreen',
|
|
|
sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) as 'effDeliveryNum',
|
|
|
sum(case when t2.send_status = 0 and t2.order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
|
|
@@ -963,7 +972,8 @@
|
|
|
END
|
|
|
) AS 'deliveryNum',
|
|
|
|
|
|
- round(sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) / sum(case when t2.order_status != 80
|
|
|
+ round(sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) / sum(case when
|
|
|
+ t2.order_status != 80
|
|
|
then 1 else 0 end),4) as 'shippingGreen',
|
|
|
|
|
|
sum(
|
|
@@ -1136,7 +1146,8 @@
|
|
|
END
|
|
|
) AS 'deliveryNum',
|
|
|
|
|
|
- round(sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) / sum(case when t2.order_status != 80
|
|
|
+ round(sum(case when t2.send_status = 1 and t2.order_status != 80 then 1 else 0 end) / sum(case when
|
|
|
+ t2.order_status != 80
|
|
|
then 1 else 0 end),4) as 'shippingGreen',
|
|
|
|
|
|
sum(
|
|
@@ -1580,7 +1591,8 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount'
|
|
|
+ IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
|
|
|
+ 'regimentalPromotionAmount'
|
|
|
FROM bytedance_order_list t1
|
|
|
WHERE flow_point != 'REFUND'
|
|
|
<if test='promoterIds != null and promoterIds.size() > 0'>
|
|
@@ -1595,7 +1607,8 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount'
|
|
|
+ IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
|
|
|
+ 'regimentalPromotionAmount'
|
|
|
FROM bytedance_order_list t1
|
|
|
WHERE flow_point != 'REFUND'
|
|
|
<if test='promoterIds != null and promoterIds.size() > 0'>
|
|
@@ -1668,7 +1681,8 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount',
|
|
|
+ IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
|
|
|
+ 'regimentalPromotionAmount',
|
|
|
COUNT(order_id) as 'orderCount'
|
|
|
FROM bytedance_order_list t1
|
|
|
WHERE flow_point != 'REFUND'
|
|
@@ -1686,7 +1700,8 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(total_pay_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS 'regimentalPromotionAmount',
|
|
|
+ IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
|
|
|
+ 'regimentalPromotionAmount',
|
|
|
COUNT(order_id) as 'orderCount'
|
|
|
FROM bytedance_order_list t1
|
|
|
WHERE flow_point != 'REFUND'
|