|
@@ -668,18 +668,18 @@
|
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNum',
|
|
|
round(sum(mcn_promotion_amount) / 100, 2) as 'mcnPromotionAmount',
|
|
|
round(sum(mcn_promotion_amount) / sum(pay_amount) * 100, 2) as 'grossMargin'
|
|
|
- from ruixuan.jy_order_list t1
|
|
|
+ from jy_order_list t1
|
|
|
where t1.stat_date = #{date}
|
|
|
<if test='dataType == "1" '>
|
|
|
and t1.clip_user_id in (
|
|
|
- select promoter_id from ruixuan.jy_kuaishou_promoter
|
|
|
+ select promoter_id from jy_kuaishou_promoter
|
|
|
where `type` = 1
|
|
|
group by promoter_id
|
|
|
)
|
|
|
</if>
|
|
|
<if test=' dataType == "2" '>
|
|
|
and t1.clip_user_id not in (
|
|
|
- select promoter_id from ruixuan.jy_kuaishou_promoter
|
|
|
+ select promoter_id from jy_kuaishou_promoter
|
|
|
where `type` = 1
|
|
|
group by promoter_id
|
|
|
)
|
|
@@ -692,18 +692,18 @@
|
|
|
sum(case when order_status != 80 then 1 else 0 end) as 'lastValidOrderNum',
|
|
|
round(sum(mcn_promotion_amount) / 100, 2) as 'lastMcnPromotionAmount',
|
|
|
round(sum(mcn_promotion_amount) / sum(pay_amount) * 100, 2) as 'lastGrossMargin'
|
|
|
- from ruixuan.jy_order_list t1
|
|
|
+ from jy_order_list t1
|
|
|
where t1.stat_date = #{lastDate}
|
|
|
<if test='dataType == "1"'>
|
|
|
and t1.clip_user_id in (
|
|
|
- select promoter_id from ruixuan.jy_kuaishou_promoter
|
|
|
+ select promoter_id from jy_kuaishou_promoter
|
|
|
where `type` = 1
|
|
|
group by promoter_id
|
|
|
)
|
|
|
</if>
|
|
|
<if test='dataType == "2" '>
|
|
|
and t1.clip_user_id not in (
|
|
|
- select promoter_id from ruixuan.jy_kuaishou_promoter
|
|
|
+ select promoter_id from jy_kuaishou_promoter
|
|
|
where `type` = 1
|
|
|
group by promoter_id
|
|
|
)
|