|
@@ -2789,101 +2789,86 @@
|
|
</select>
|
|
</select>
|
|
<select id="getKsChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getKsChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
select stat_hour as 'time',
|
|
select stat_hour as 'time',
|
|
- round(sum(t2.pay_amount) / 100, 2) as 'charge'
|
|
|
|
- from (select promoter_id, user_id
|
|
|
|
- from kuaishou_promoter where
|
|
|
|
- 1 = 1
|
|
|
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge' from kuaishou_supply_chain
|
|
|
|
+ where stat_date = #{date}
|
|
<if test='userList != null and userList.size() > 0'>
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
|
+ and promoter_id in (
|
|
|
|
+ select promoter_id
|
|
|
|
+ from kuaishou_promoter where
|
|
|
|
+ 1 = 1
|
|
and user_id in
|
|
and user_id in
|
|
<foreach collection="userList" item="item" separator=","
|
|
<foreach collection="userList" item="item" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
-
|
|
|
|
|
|
+ group by promoter_id
|
|
|
|
+ )
|
|
</if>
|
|
</if>
|
|
- group by promoter_id ) t1
|
|
|
|
- inner join (select id, promoter_id, stat_hour, pay_amount
|
|
|
|
- from kuaishou_supply_chain
|
|
|
|
- where stat_date = #{date}
|
|
|
|
- and order_status != 80) t2
|
|
|
|
- on t1.promoter_id = t2.promoter_id
|
|
|
|
group by stat_hour
|
|
group by stat_hour
|
|
- order by stat_hour asc
|
|
|
|
|
|
+ order by stat_hour asc;
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getKsCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getKsCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
- select stat_hour as 'time',
|
|
|
|
- round(sum(t2.pay_amount) / 100, 2) as 'charge'
|
|
|
|
- from (
|
|
|
|
- select item_id, user_id
|
|
|
|
- from kuaishou_item_list where
|
|
|
|
- 1 = 1
|
|
|
|
|
|
+ select stat_hour as 'time',
|
|
|
|
+ round(sum(pay_amount) / 100, 2) as 'charge'
|
|
|
|
+ from kuaishou_supply_chain
|
|
|
|
+ where stat_date = #{date}
|
|
<if test='userList != null and userList.size() > 0'>
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
|
+ and item_id in (
|
|
|
|
+ select item_id
|
|
|
|
+ from kuaishou_item_list where
|
|
|
|
+ 1 = 1
|
|
and user_id in
|
|
and user_id in
|
|
<foreach collection="userList" item="item" separator=","
|
|
<foreach collection="userList" item="item" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
-
|
|
|
|
|
|
+ group by item_id
|
|
|
|
+ )
|
|
</if>
|
|
</if>
|
|
- group by item_id) t1
|
|
|
|
- inner join (select id, item_id, stat_hour, pay_amount
|
|
|
|
- from kuaishou_supply_chain
|
|
|
|
- where stat_date = #{date}
|
|
|
|
- and order_status != 80) t2
|
|
|
|
- on t1.item_id = t2.item_id
|
|
|
|
group by stat_hour
|
|
group by stat_hour
|
|
- order by stat_hour asc
|
|
|
|
-
|
|
|
|
|
|
+ order by stat_hour asc;
|
|
|
|
|
|
</select>
|
|
</select>
|
|
<select id="getBytedanceChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getBytedanceChannelGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
select pay_success_time_hour as 'time',
|
|
select pay_success_time_hour as 'time',
|
|
- round(sum(t2.total_pay_amount) / 100, 2) as 'charge'
|
|
|
|
- from (select promoter_id, user_id
|
|
|
|
- from kuaishou_promoter where
|
|
|
|
- 1 = 1
|
|
|
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
|
|
<if test='userList != null and userList.size() > 0'>
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
|
+ and author_short_id in(
|
|
|
|
+ select promoter_id
|
|
|
|
+ from kuaishou_promoter where
|
|
|
|
+ 1 = 1
|
|
and user_id in
|
|
and user_id in
|
|
<foreach collection="userList" item="item" separator=","
|
|
<foreach collection="userList" item="item" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
-
|
|
|
|
|
|
+ group by promoter_id
|
|
|
|
+ )
|
|
</if>
|
|
</if>
|
|
- group by promoter_id ) t1
|
|
|
|
- inner join (select order_id, author_short_id, pay_success_time_hour, total_pay_amount
|
|
|
|
- from bytedance_order_list
|
|
|
|
- where pay_success_time = #{date}
|
|
|
|
- and flow_point != 'REFUND') t2
|
|
|
|
- on t1.promoter_id = t2.author_short_id
|
|
|
|
group by pay_success_time_hour
|
|
group by pay_success_time_hour
|
|
- order by pay_success_time_hour asc
|
|
|
|
|
|
+ order by pay_success_time_hour asc;
|
|
|
|
|
|
</select>
|
|
</select>
|
|
<select id="getBytedanceCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getBytedanceCourtshipGmvHourByDate" resultType="com.alibaba.fastjson.JSONObject">
|
|
select pay_success_time_hour as 'time',
|
|
select pay_success_time_hour as 'time',
|
|
- round(sum(t2.total_pay_amount) / 100, 2) as 'charge'
|
|
|
|
- from (select item_id, user_id
|
|
|
|
- from kuaishou_item_list where
|
|
|
|
- 1 = 1
|
|
|
|
|
|
+ round(sum(total_pay_amount) / 100, 2) as 'charge' from bytedance_order_list where pay_success_time = #{date}
|
|
<if test='userList != null and userList.size() > 0'>
|
|
<if test='userList != null and userList.size() > 0'>
|
|
|
|
+ and product_id in(
|
|
|
|
+ select item_id
|
|
|
|
+ from kuaishou_item_list where
|
|
|
|
+ 1 = 1
|
|
and user_id in
|
|
and user_id in
|
|
<foreach collection="userList" item="item" separator=","
|
|
<foreach collection="userList" item="item" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
-
|
|
|
|
|
|
+ group by item_id
|
|
|
|
+ )
|
|
</if>
|
|
</if>
|
|
- group by item_id ) t1
|
|
|
|
- inner join (select order_id, product_id, pay_success_time_hour, total_pay_amount
|
|
|
|
- from bytedance_order_list
|
|
|
|
- where pay_success_time = #{date}
|
|
|
|
- and flow_point != 'REFUND') t2
|
|
|
|
- on t1.item_id = t2.product_id
|
|
|
|
group by pay_success_time_hour
|
|
group by pay_success_time_hour
|
|
- order by pay_success_time_hour asc
|
|
|
|
|
|
+ order by pay_success_time_hour asc;
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="replaceKuaiShouActivityOpenItemList">
|
|
<insert id="replaceKuaiShouActivityOpenItemList">
|