浏览代码

抖音数据表,前置添加ruixuan

zhaoxian 11 月之前
父节点
当前提交
58fde2e9fd

+ 42 - 42
ruixuan-live/src/main/resources/mapper/bytedance/JiaoYangCallbackMapper.xml

@@ -93,7 +93,7 @@
                second_real_commission,
                create_time,
                stat_date
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
     </sql>
 
     <select id="SELECTBytedancePromoterOrderListList"
@@ -198,8 +198,8 @@
         t1.author_bind_user_id,
         IFNULL(t1.author_bind_user_name,'-') AS 'userName'
         FROM
-        bytedance_promoter_order_list t1 LEFT JOIN
-        bytedance_order_list t2 ON t1.order_id = t2.order_id
+        ruixuan.bytedance_promoter_order_list t1 LEFT JOIN
+        ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         <where>
             <if test="hour != null and hour != ''">
                 and t2.pay_success_time_hour &lt;= #{hour}
@@ -224,8 +224,8 @@
         IFNULL(t1.author_short_id,'-') AS 'promoterId',
         count( t1.order_id ) AS 'orderNum'
         FROM
-        bytedance_promoter_order_list t1 LEFT JOIN
-        bytedance_order_list t2 ON t1.order_id = t2.order_id
+        ruixuan.bytedance_promoter_order_list t1 LEFT JOIN
+        ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         <where>
             <if test="hour != null and hour != ''">
                 and t2.pay_success_time_hour &lt;= #{hour}
@@ -255,7 +255,7 @@
         product_name AS 'itemTitle',
         product_img AS 'imageUrl',
         count(order_id) AS 'orderNum'
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE author_short_id = #{promoterId}
         <if test="start != null and start != ''">
             and pay_success_time &gt;= #{start}
@@ -309,11 +309,11 @@
         sum(colonel_real_commission)/100 AS 'totalRegimentalSettleAmount',
         IFNULL(SUM(CASE WHEN sample_voucher_status = 2 THEN colonel_real_commission ELSE 0 END)/100, 0) AS
         'voucherTotalRegimentalSettleAmount'
-        FROM bytedance_promoter_order_list t
+        FROM ruixuan.bytedance_promoter_order_list t
         LEFT JOIN (
         SELECT author_bind_user_id AS 'collectSampleId',
         sum(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END) AS 'validOrderNUm'
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE author_bind_user_id is not null
         <if test="start != null and start != ''">
             and pay_success_time &gt;= #{start}
@@ -404,7 +404,7 @@
         'validRadio',
         sum(case when flow_point != 'REFUND' then total_pay_amount else 0 end)/100 AS 'payAmount',
         CONCAT(round(colonel_commission_rate/100,2),'%') AS 'regimentalPromotionRate'
-        FROM bytedance_promoter_order_list tt
+        FROM ruixuan.bytedance_promoter_order_list tt
         WHERE 1= 1
         <if test="promoterId != null and promoterId != ''">
             and tt.author_short_id = #{promoterId}
@@ -457,8 +457,8 @@
         SUM(CASE
         WHEN t1.flow_point != 'REFUND' and t1.colonel_type != 2 THEN t1.second_estimated_commission
         ELSE 0 END) / 100 AS 'secondEstimatedCommission'
-        FROM bytedance_promoter_order_list t1
-        LEFT JOIN bytedance_order_list t2 ON t1.order_id = t2.order_id
+        FROM ruixuan.bytedance_promoter_order_list t1
+        LEFT JOIN ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         <where>
             <if test="hour != null and hour != ''">
                 and t2.pay_success_time_hour &lt;= #{hour}
@@ -485,8 +485,8 @@
         SELECT
         t1.product_id AS 'itemId',
         count(t1.order_id) AS 'orderNum'
-        FROM bytedance_promoter_order_list t1
-        LEFT JOIN bytedance_order_list t2 ON t1.order_id = t2.order_id
+        FROM ruixuan.bytedance_promoter_order_list t1
+        LEFT JOIN ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         <where>
             <if test="hour != null and hour != ''">
                 and t2.pay_success_time_hour &lt;= #{hour}
@@ -541,8 +541,8 @@
         ELSE 0 END) / 100 AS 'secondEstimatedCommission',
         sum(case when t2.flow_point != 'REFUND' then t2.colonel_real_commission else 0 end)/100 as
         'totalRegimentalSettleAmount'
-        FROM bytedance_promoter_order_list t2
-        LEFT JOIN bytedance_order_list t3 ON t3.order_id = t2.order_id
+        FROM ruixuan.bytedance_promoter_order_list t2
+        LEFT JOIN ruixuan.bytedance_order_list t3 ON t3.order_id = t2.order_id
         WHERE product_bind_user_id is not null
         <if test="hour != null and hour != ''">
             and t3.pay_success_time_hour &lt;= #{hour}
@@ -565,8 +565,8 @@
         SELECT
         t2.product_bind_user_id,
         count(t2.order_id) AS 'orderNum'
-        FROM bytedance_promoter_order_list t2
-        LEFT JOIN bytedance_order_list t3 ON t3.order_id = t2.order_id
+        FROM ruixuan.bytedance_promoter_order_list t2
+        LEFT JOIN ruixuan.bytedance_order_list t3 ON t3.order_id = t2.order_id
         WHERE product_bind_user_id is not null
         <if test="hour != null and hour != ''">
             and t3.pay_success_time_hour &lt;= #{hour}
@@ -630,8 +630,8 @@
         t1.colonel_real_commission,
         t1.colonel_type,
         t1.second_estimated_commission
-        FROM bytedance_promoter_order_list t1
-        LEFT JOIN bytedance_order_list t2 ON t1.order_id = t2.order_id
+        FROM ruixuan.bytedance_promoter_order_list t1
+        LEFT JOIN ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         WHERE t2.pay_success_time &gt;= #{start}
         <if test="hour != null and hour != ''">
             and t2.pay_success_time_hour &lt;= #{hour}
@@ -667,8 +667,8 @@
         SELECT
         t1.product_id,
         t1.order_id
-        FROM bytedance_promoter_order_list t1
-        LEFT JOIN bytedance_order_list t2 ON t1.order_id = t2.order_id
+        FROM ruixuan.bytedance_promoter_order_list t1
+        LEFT JOIN ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         WHERE t2.pay_success_time &gt;= #{lastTimeStart}
         AND t2.pay_success_time &lt;= #{lastTimeEnd}
         <if test="hour != null and hour != ''">
@@ -691,7 +691,7 @@
         SELECT author_short_id AS 'promoterId',
         author_short_name AS 'promoterNickName',
         count(order_id) AS 'orderNum'
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE product_id = #{itemId}
         AND author_bind_user_id is not null
         <if test="start != null and start != ''">
@@ -714,7 +714,7 @@
         SELECT
         order_id,
         pay_success_time
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE 1 = 1
         <if test="promoterId != null and promoterId != ''">
             and author_short_id = #{promoterId}
@@ -743,7 +743,7 @@
         sum(case when flow_point = 'REFUND' then 1 else 0 end) AS 'validOrderNUm',
         CONCAT(round(sum(case when flow_point != 'REFUND' then 1 else 0 end) / count(order_id)*100, 2),'%') as
         'validRadio'
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE 1= 1
         <if test="itemId != null and itemId != ''">
             and product_id = #{itemId}
@@ -775,7 +775,7 @@
         round(sum(t2.pay_goods_amount) / 100, 2) as 'regimentalPromotionAmount',
         round(sum(t2.settled_goods_amount) / 100, 2) as 'totalRegimentalSettleAmount'
         from promoter_bind_channel_date t1
-        left join bytedance_promoter_order_list t2
+        left join ruixuan.bytedance_promoter_order_list t2
         on t1.promoter_id = t2.author_short_id and t1.stat_date = t2.pay_success_time
         where 1 = 1
         <if test="start != null and start != '' ">
@@ -810,7 +810,7 @@
         round(sum(t2.pay_goods_amount) / 100, 2) as 'regimentalPromotionAmount',
         round(sum(t2.settled_goods_amount) / 100, 2) as 'totalRegimentalSettleAmount'
         from promoter_bind_channel_date t1
-        left join bytedance_promoter_order_list t2
+        left join ruixuan.bytedance_promoter_order_list t2
         on t1.promoter_id = t2.author_short_id and t1.stat_date = t2.pay_success_time
         where 1 = 1
         <if test="start != null and start != '' ">
@@ -845,7 +845,7 @@
         'regimentalPromotionAmount',
         sum( CASE WHEN t2.flow_point != 'REFUND' THEN t2.colonel_real_commission ELSE 0 END ) AS
         'totalRegimentalSettleAmount'
-        FROM bytedance_promoter_order_list t2
+        FROM ruixuan.bytedance_promoter_order_list t2
         WHERE
         1 = 1
         <if test="start != null and start != ''">
@@ -880,7 +880,7 @@
         round( sum( CASE WHEN flow_point != 'REFUND' THEN colonel_real_commission ELSE 0 END ) / 100, 2 ) AS
         'totalRegimentalSettleAmount',
         CONCAT(round(colonel_commission_rate/100,2),'%') AS 'itemCommissionRate'
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE
         product_bind_user_id is not null
         <if test="start != null and start != ''">
@@ -915,7 +915,7 @@
         sum(case when flow_point != 'REFUND' then 1 else 0 end) AS 'validOrderNUm',
         CONCAT(round(sum(case when flow_point != 'REFUND' then 1 else 0 end) / count(order_id)*100, 2),'%') AS
         'validRadio'
-        FROM bytedance_promoter_order_list
+        FROM ruixuan.bytedance_promoter_order_list
         WHERE author_short_id is not null
         <if test="start != null and start != ''">
             and pay_success_time &gt;= #{start}
@@ -973,7 +973,7 @@
         100 AS 'secondEstimatedCommission',
         round(sum(t2.colonel_real_commission) / 100, 2) as 'totalRegimentalSettleAmount'
         from (select user_id, user_name, promoter_id, stat_date
-        from promoter_bind_channel_date
+        from ruixuan.promoter_bind_channel_date
         where media_id = 1
         <if test="start != null and start != ''">
             and stat_date &gt;= #{start}
@@ -987,7 +987,7 @@
         ) t1
         left join (
         select *
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         <where>
             <if test="hour != null and hour != ''">
                 and pay_success_time_hour &lt;= #{hour}
@@ -1007,7 +1007,7 @@
         select t1.user_id,
         count(t2.order_id) as 'orderNum'
         from (select user_id, promoter_id, stat_date
-        from promoter_bind_channel_date
+        from ruixuan.promoter_bind_channel_date
         where media_id = 1
         <if test="lastTimeStart != null and lastTimeStart != ''">
             and stat_date &gt;= #{lastTimeStart}
@@ -1023,7 +1023,7 @@
         select author_short_id,
         order_id,
         pay_success_time
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         <where>
             <if test="hour != null and hour != ''">
                 and pay_success_time_hour &lt;= #{hour}
@@ -1040,18 +1040,18 @@
         ) t11 ON t11.user_id = t.collectSampleId
         left join (select user_id,
         count(distinct promoter_id) as 'promoterCount'
-        from kuaishou_promoter
+        from ruixuan.kuaishou_promoter
         group by user_id) tt on t.collectSampleId = tt.user_id
         left join (select collect_sample_id as 'user_id',
         count(distinct promoter_id) as 'sampleCount'
-        from kuaishou_item_collect_samples
+        from ruixuan.kuaishou_item_collect_samples
         where collect_sample_status > 2
         group by collect_sample_id) ttt on t.collectSampleId = ttt.user_id
         left join (select collect_sample_id as 'user_id',
         count(1) as 'sendTotalCount',
         count(distinct promoter_id) as 'sendPromoterCount',
         count(distinct item_id) as 'sendItemCount'
-        from kuaishou_item_collect_samples
+        from ruixuan.kuaishou_item_collect_samples
         where collect_sample_status > 2
         <if test="collectSampleId != null and collectSampleId != ''">
             and collect_sample_id = #{collectSampleId}
@@ -1065,7 +1065,7 @@
         </if>
         group by collect_sample_id) tttt on t.collectSampleId = tttt.user_id
         left join (select user_id, promoters_count
-        from user_promoters_count
+        from ruixuan.user_promoters_count
         where media_id = 1) ttttt
         on t.collectSampleId = ttttt.user_id
         where t.orderNum > 0
@@ -1103,8 +1103,8 @@
         left join
         (
         select t1.*
-        from bytedance_promoter_order_list t1
-        LEFT JOIN bytedance_order_list t2 ON t1.order_id = t2.order_id
+        from ruixuan.bytedance_promoter_order_list t1
+        LEFT JOIN ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         where t2.pay_success_time &gt;= #{bindStartDate}
         and t2.pay_success_time_hour &lt;= #{hour}
         ) t2 ON t1.promoter_id = t2.author_short_id
@@ -1128,8 +1128,8 @@
         from kuaishou_promoter t1
         left join
         (select t1.order_id,t1.author_short_id
-        from bytedance_promoter_order_list t1
-        LEFT JOIN bytedance_order_list t2 ON t1.order_id = t2.order_id
+        from ruixuan.bytedance_promoter_order_list t1
+        LEFT JOIN ruixuan.bytedance_order_list t2 ON t1.order_id = t2.order_id
         where t2.pay_success_time &gt;= #{lastTimeStart}
         AND t2.pay_success_time &lt;= #{lastTimeEnd}
         and t2.pay_success_time_hour &lt;= #{hour}
@@ -1209,7 +1209,7 @@
                    then second_estimated_commission
                ELSE 0 END) * 0.9 / 100 AS
                                                                                                                        'regimentalPromotionAmount'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where author_short_id = #{promoterId}
           and pay_success_time >= #{start}
           and pay_success_time &lt;= #{end}

+ 9 - 1
ruixuan-live/src/main/resources/mapper/isc/KuaishouPromoterMapper.xml

@@ -379,7 +379,15 @@
 
     <select id="selectPromoterIdList" resultType="String">
         select promoter_id
-        from kuaishou_promoter
+        from
+        <choose>
+            <when test='mediaId == "1" or mediaId == 1'>
+                ruixuan.kuaishou_promoter
+            </when>
+            <otherwise>
+                kuaishou_promoter
+            </otherwise>
+        </choose>
         <where>
             <if test="userList != null ">
                 AND user_id in

+ 26 - 26
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -614,7 +614,7 @@
         count(order_id) as 'orderNum',
         sum(case when flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNUm',
         round(sum(case when flow_point != 'REFUND' then 1 else 0 end) / count(order_id),4) as 'validRadio'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where 1= 1
         <if test="nowStartHourTemp != null and nowStartHourTemp != ''">
             and pay_success_time &gt;= #{nowStartHourTemp}
@@ -630,7 +630,7 @@
         left join (select
         product_id as 'itemId',
         count(order_id) as 'orderNum'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where 1=1
         <if test="yesterdayStartHourTemp != null and yesterdayStartHourTemp != ''">
             and pay_success_time &gt;= #{yesterdayStartHourTemp}
@@ -680,7 +680,7 @@
         count(order_id) as 'orderNum',
         sum(case when flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNUm',
         round(sum(case when flow_point != 'REFUND' then 1 else 0 end) / count(order_id),4) as 'validRadio'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where 1= 1
         <if test="start != null and start != ''">
             and pay_success_time &gt;= #{start}
@@ -756,7 +756,7 @@
         count(order_id) as 'orderNum',
         sum(case when flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNUm',
         round(sum(case when flow_point != 'REFUND' then 1 else 0 end) / count(order_id),4) as 'validRadio'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where author_short_id is not null
         <if test='promoterIds != null and promoterIds.size() > 0'>
             AND author_short_id IN
@@ -780,7 +780,7 @@
         select
         author_short_id as 'promoterId',
         count(order_id) as 'orderNum'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where 1=1
         <if test='promoterIds != null and promoterIds.size() > 0'>
             AND author_short_id IN
@@ -833,7 +833,7 @@
         count(order_id) as 'orderNum',
         sum(case when flow_point != 'REFUND' then 1 else 0 end) as 'validOrderNUm',
         round(sum(case when flow_point != 'REFUND' then 1 else 0 end) / count(order_id),4) as 'validRadio'
-        from bytedance_order_list
+        from ruixuan.bytedance_order_list
         where author_short_id is not null
         <if test="start != null and start != ''">
             and pay_success_time &gt;= #{start}
@@ -1646,7 +1646,7 @@
         WHEN flow_point != 'REFUND' and colonel_type != 2
         THEN second_estimated_commission
         ELSE 0 END) ,0) AS 'secondEstimatedCommission'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >=#{startDate}
         AND pay_success_time &lt;=#{endDate}
         AND pay_success_time_hour &lt;=#{hour}
@@ -1670,7 +1670,7 @@
         then second_estimated_commission
         ELSE 0 END) * 0.9,0) AS
         'regimentalPromotionAmount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >=#{lastTimeStart}
         AND pay_success_time &lt;=#{lastTimeEnd}
         AND pay_success_time_hour &lt;=#{hour}
@@ -1750,7 +1750,7 @@
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END)/100, 0) AS 'baseAmount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9 /100,0) AS
         'regimentalPromotionAmount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >= #{startDate}
         AND pay_success_time &lt;= #{endDate}
         AND pay_success_time_hour &lt;=#{hour}
@@ -1768,7 +1768,7 @@
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END)/100, 0) AS 'baseAmount',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9 /100,0) AS
         'regimentalPromotionAmount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >= #{lastTimeStart}
         AND pay_success_time &lt;= #{lastTimeEnd}
         AND pay_success_time_hour &lt;=#{hour}
@@ -1814,7 +1814,7 @@
         ELSE 0
         END
         )/100,0) AS 'orderAmount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >= #{statDate}
         AND pay_success_time &lt;= #{endDate}
         <if test='hour != null'>
@@ -1888,7 +1888,7 @@
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9 ,0) AS
         'regimentalPromotionAmount',
         COUNT(DISTINCT author_short_id) as 'promoterCount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >= #{startLong}
         AND pay_success_time &lt;= #{endLong}
         <if test='promoterIds != null and promoterIds.size() > 0'>
@@ -1897,7 +1897,7 @@
                 #{item}
             </foreach>
         </if>
-        GROUP BY pay_success_time) t left join bytedance_valid_order_gmv_rate t2
+        GROUP BY pay_success_time) t left join ruixuan.bytedance_valid_order_gmv_rate t2
         on t.dateInt = t2.stat_date
     </select>
 
@@ -1950,7 +1950,7 @@
         total_pay_amount),0) * 100,2 ),'%') as 'validOrderAmountRate',
         IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN colonel_estimated_commission ELSE 0 END) * 0.9,0) AS
         'regimentalPromotionAmount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time >= #{startLong}
         AND pay_success_time &lt;= #{endLong}
         <if test='itemIds != null and itemIds.size() > 0'>
@@ -1960,7 +1960,7 @@
                 #{item}
             </foreach>
         </if>
-        GROUP BY pay_success_time) t left join bytedance_valid_order_gmv_rate t2
+        GROUP BY pay_success_time) t left join ruixuan.bytedance_valid_order_gmv_rate t2
         on t.dateInt = t2.stat_date
     </select>
 
@@ -2015,7 +2015,7 @@
         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'
-        FROM bytedance_order_list t1
+        FROM ruixuan.bytedance_order_list t1
         WHERE flow_point != 'REFUND'
         <if test='promoterIds != null and promoterIds.size() > 0'>
             AND author_short_id in
@@ -2031,7 +2031,7 @@
         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'
-        FROM bytedance_order_list t1
+        FROM ruixuan.bytedance_order_list t1
         WHERE flow_point != 'REFUND'
         <if test='promoterIds != null and promoterIds.size() > 0'>
             AND author_short_id in
@@ -2105,7 +2105,7 @@
         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
+        FROM ruixuan.bytedance_order_list t1
         WHERE flow_point != 'REFUND'
         <if test='itemIds != null and itemIds.size() > 0'>
             AND product_id in
@@ -2124,7 +2124,7 @@
         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
+        FROM ruixuan.bytedance_order_list t1
         WHERE flow_point != 'REFUND'
         <if test='itemIds != null and itemIds.size() > 0'>
             AND product_id in
@@ -3265,7 +3265,7 @@
 
     <select id="getBytedanceOrderHourDataList" resultType="com.alibaba.fastjson.JSONObject">
         SELECT pay_success_time_hour AS 'hour', IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN 1 ELSE 0 END), 0) AS 'validOrderNum', IFNULL(SUM(CASE WHEN flow_point != 'REFUND' THEN total_pay_amount ELSE 0 END), 0) AS 'baseAmount'
-        FROM bytedance_order_list
+        FROM ruixuan.bytedance_order_list
         WHERE pay_success_time = #{date}
         GROUP BY pay_success_time_hour
         ORDER BY pay_success_time_hour
@@ -3506,7 +3506,7 @@
         <if test="hourType == 2 ">
             count(1) as 'charge'
         </if>
-        from bytedance_order_list where pay_success_time = #{date}
+        from ruixuan.bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and author_short_id in(
             select promoter_id
@@ -3539,7 +3539,7 @@
             count(1) as 'charge'
         </if>
 
-        from bytedance_order_list where pay_success_time = #{date}
+        from ruixuan.bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and author_short_id in(
             select promoter_id
@@ -3564,7 +3564,7 @@
         <if test="hourType == 2 ">
             count(1) as 'charge'
         </if>
-        from bytedance_order_list
+        from ruixuan.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(
@@ -3591,7 +3591,7 @@
         </if>
         <if test="hourType == 2 ">
             count(1) as 'charge'
-        </if> from bytedance_order_list where pay_success_time = #{date}
+        </if> from ruixuan.bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and product_id in(
             select item_id
@@ -3623,7 +3623,7 @@
         <if test="hourType == 2 ">
             count(1) as 'charge'
         </if>
-        from bytedance_order_list where pay_success_time = #{date}
+        from ruixuan.bytedance_order_list where pay_success_time = #{date}
         <if test='userList != null and userList.size() > 0'>
             and product_id in(
             select item_id
@@ -3648,7 +3648,7 @@
         <if test="hourType == 2 ">
             count(1) as 'charge'
         </if>
-        from bytedance_order_list
+        from ruixuan.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(