|
@@ -32,11 +32,13 @@
|
|
|
b.goods_name as goodsName,
|
|
|
ch.name as orderChannel,
|
|
|
count(1) as serviceTime,
|
|
|
- sum(if(a.status in (3,4),1,0)) as servicedTime
|
|
|
+ sum(if(a.status in (3,4),1,0)) as servicedTime,
|
|
|
+ sum(c.actual_price/bk.service_times) as gmv
|
|
|
from jlife_nurse.jz_order_book_detail a
|
|
|
join jlife_nurse.jz_order_goods b on a.order_id=b.order_id
|
|
|
join jlife_nurse.jz_order c on c.id=a.order_id
|
|
|
join jlife_nurse.jz_dm_channel ch on c.order_channel=ch.id
|
|
|
+ join jlife_nurse.jz_order_book bk on a.book_id=bk.id
|
|
|
where a.book_date between #{startTime} and #{endTime}
|
|
|
and a.status in (1,2,3,4,7)
|
|
|
and b.goods_name like '%花王%'
|