|
@@ -1125,13 +1125,17 @@
|
|
|
SELECT
|
|
|
FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
|
|
|
IFNULL(SUM(order_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
+ IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
IFNULL(promoterCount,0) AS 'promoterCount'
|
|
|
FROM kuaishou_supply_chain t1
|
|
|
LEFT JOIN (
|
|
|
SELECT count(promoter_id) as 'promoterCount', DATE_FORMAT(create_time, '%Y-%m-%d') as 'date'
|
|
|
FROM kuaishou_promoter
|
|
|
- WHERE user_id = #{userId}
|
|
|
+ WHERE user_id in
|
|
|
+ <foreach collection="userList" item="item" separator=","
|
|
|
+ open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{start}
|
|
|
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{end}
|
|
|
GROUP BY DATE_FORMAT(create_time, '%Y-%m-%d')
|
|
@@ -1152,7 +1156,7 @@
|
|
|
SELECT
|
|
|
FROM_UNIXTIME(order_create_time / 1000, '%Y-%m-%d') as 'date',
|
|
|
IFNULL(SUM(order_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
+ IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
count(oid) AS 'orderCount'
|
|
|
FROM kuaishou_supply_chain
|
|
|
WHERE order_status != 80
|
|
@@ -1179,7 +1183,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(order_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount'
|
|
|
+ IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount'
|
|
|
FROM kuaishou_supply_chain t1
|
|
|
WHERE order_status != 80
|
|
|
<if test='promoterIds != null and promoterIds.size() > 0'>
|
|
@@ -1194,7 +1198,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(order_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount'
|
|
|
+ IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount'
|
|
|
FROM kuaishou_supply_chain t1
|
|
|
WHERE order_status != 80
|
|
|
<if test='promoterIds != null and promoterIds.size() > 0'>
|
|
@@ -1220,7 +1224,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(order_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
+ IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
COUNT(oid) as 'orderCount'
|
|
|
FROM kuaishou_supply_chain t1
|
|
|
WHERE order_status != 80
|
|
@@ -1238,7 +1242,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
IFNULL(SUM(order_amount),0) AS 'orderAmount',
|
|
|
- IFNULL(SUM(total_regimental_settle_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
+ IFNULL(SUM(regimental_promotion_amount),0) AS 'totalRegimentalSettleAmount',
|
|
|
COUNT(oid) as 'orderCount'
|
|
|
FROM kuaishou_supply_chain t1
|
|
|
WHERE order_status != 80
|