|
@@ -224,11 +224,7 @@
|
|
|
else round(t3.ccr_value / 100 , 2)
|
|
|
end
|
|
|
) as 'ccrInt',
|
|
|
- t3.shop_star as 'shopStar',
|
|
|
- t3.mall_logistics_score as 'mallLogisticsScore',
|
|
|
- t3.shop_score as 'shopScore',
|
|
|
- t3.mall_service_score as 'mallServiceScore',
|
|
|
- t3.mall_quality_score as 'mallQualityScore',
|
|
|
+ t3.store_score as 'storeScore',
|
|
|
(
|
|
|
case when t5.is_presale = 1
|
|
|
then '否'
|
|
@@ -296,14 +292,9 @@
|
|
|
else '-'
|
|
|
end
|
|
|
) as 'isPresale',
|
|
|
- t3.shop_star as 'shopStar',
|
|
|
- t3.mall_logistics_score as 'mallLogisticsScore',
|
|
|
- t3.shop_score as 'shopScore',
|
|
|
- t3.mall_service_score as 'mallServiceScore',
|
|
|
- t3.mall_quality_score as 'mallQualityScore'
|
|
|
+ t3.store_score as 'storeScore',
|
|
|
from (select t.item_id as 'itemId', t.item_title as 'itemTitle', t.user_id as 'userId', t.user_name as
|
|
|
'userName',
|
|
|
-
|
|
|
(case
|
|
|
when tt.ccr_value is null or tt.ccr_value = 0
|
|
|
then '0%'
|
|
@@ -3283,7 +3274,14 @@
|
|
|
</select>
|
|
|
<select id="getKsChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select stat_hour as 'time',
|
|
|
- round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+
|
|
|
+ from kuaishou_supply_chain
|
|
|
where stat_date = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and promoter_id in (
|
|
@@ -3307,8 +3305,16 @@
|
|
|
t1.time,
|
|
|
ROUND(((t1.charge-t2.charge)/t2.charge)*100,2) as 'roi'
|
|
|
FROM
|
|
|
- (select stat_hour as 'time',
|
|
|
- round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
|
|
|
+ (
|
|
|
+ select stat_hour as 'time',
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+
|
|
|
+ from kuaishou_supply_chain
|
|
|
where stat_date = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and promoter_id in (
|
|
@@ -3327,7 +3333,13 @@
|
|
|
) t1
|
|
|
LEFT JOIN
|
|
|
(select stat_hour as 'time',
|
|
|
- round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+ from kuaishou_supply_chain
|
|
|
where stat_date = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and promoter_id in (
|
|
@@ -3350,7 +3362,12 @@
|
|
|
|
|
|
<select id="getKsCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select stat_hour as 'time',
|
|
|
- round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
from kuaishou_supply_chain
|
|
|
where stat_date = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
@@ -3377,7 +3394,12 @@
|
|
|
ROUND(((t1.charge-t2.charge)/t2.charge)*100,2) as 'roi'
|
|
|
FROM
|
|
|
( select stat_hour as 'time',
|
|
|
- round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
from kuaishou_supply_chain
|
|
|
where stat_date = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
@@ -3398,7 +3420,12 @@
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
select stat_hour as 'time',
|
|
|
- round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
from kuaishou_supply_chain
|
|
|
where stat_date = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
@@ -3420,7 +3447,13 @@
|
|
|
</select>
|
|
|
<select id="getBytedanceChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select pay_success_time_hour as 'time',
|
|
|
- round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+ from bytedance_order_list where pay_success_time = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and author_short_id in(
|
|
|
select promoter_id
|
|
@@ -3446,7 +3479,14 @@
|
|
|
FROM
|
|
|
(
|
|
|
select pay_success_time_hour as 'time',
|
|
|
- round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+
|
|
|
+ from bytedance_order_list where pay_success_time = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and author_short_id in(
|
|
|
select promoter_id
|
|
@@ -3465,7 +3505,13 @@
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
select pay_success_time_hour as 'time',
|
|
|
- round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+ from bytedance_order_list
|
|
|
where pay_success_time = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and author_short_id in(
|
|
@@ -3487,7 +3533,12 @@
|
|
|
|
|
|
<select id="getBytedanceCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select pay_success_time_hour as 'time',
|
|
|
- round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if> from bytedance_order_list where pay_success_time = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and product_id in(
|
|
|
select item_id
|
|
@@ -3513,7 +3564,13 @@
|
|
|
FROM
|
|
|
(
|
|
|
select pay_success_time_hour as 'time',
|
|
|
- round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+ from bytedance_order_list where pay_success_time = #{date}
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and product_id in(
|
|
|
select item_id
|
|
@@ -3532,7 +3589,13 @@
|
|
|
LEFT JOIN
|
|
|
(
|
|
|
select pay_success_time_hour as 'time',
|
|
|
- round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list
|
|
|
+ <if test="hourType == 1 ">
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge'
|
|
|
+ </if>
|
|
|
+ <if test="hourType == 2 ">
|
|
|
+ count(1) as 'charge'
|
|
|
+ </if>
|
|
|
+ from bytedance_order_list
|
|
|
where pay_success_time = DATE_FORMAT(DATE_SUB(#{date},INTERVAL 1 day),'%Y%m%d')
|
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
and product_id in(
|