orders aggs_biz_ding_piao_rpt, city_name ext qudao_name
This commit is contained in:
@@ -967,7 +967,7 @@ class Orders_v2_entity{
|
||||
(
|
||||
SELECT b.type as biz_type,
|
||||
if(b.type in (3), b.city_id, o.biz_id) as biz_id,
|
||||
if(b.type in (3), if(c.`name` is null, b.city_id, c.`name`), b.biz_name) as biz_name,
|
||||
if(b.type in (3), if(c.`name` is null, b.city_id, replace(concat(c.`name`, '渠道'), '市渠道', '渠道')), b.biz_name) as biz_name,
|
||||
count(if(o.order_time >= '$today_start' AND o.order_time < '$today_end', o.id, null)) as doc_ding_today,
|
||||
count(o.id) as doc_ding, null as doc_piao_today, null as doc_piao
|
||||
FROM lc_receiver_orders_v2 o JOIN
|
||||
@@ -983,7 +983,7 @@ class Orders_v2_entity{
|
||||
union all
|
||||
SELECT b.type as biz_type,
|
||||
if(b.type in (3), b.city_id, o.biz_id) as biz_id,
|
||||
if(b.type in (3), if(c.`name` is null, b.city_id, c.`name`), b.biz_name) as biz_name,
|
||||
if(b.type in (3), if(c.`name` is null, b.city_id, replace(concat(c.`name`, '渠道'), '市渠道', '渠道')), b.biz_name) as biz_name,
|
||||
null as doc_ding_today, null as doc_ding,
|
||||
count(if(o.bill_time >= '$today_start' AND o.bill_time < '$today_end', o.id, null)) as doc_piao_today,
|
||||
count(o.id) as doc_piao
|
||||
|
||||
Reference in New Issue
Block a user