//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql+=" and t1.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and purchase_create_time >= '2021-12-23')";
if(!string.IsNullOrEmpty(parameter.sort))
{
sql+=" order by t1."+parameter.sort+" "+parameter.order;
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql+=" and t1.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and purchase_create_time >= '2021-12-23')";
varsql=$@"select {showcol} as count,t0.platform_type,t2.category_simple_id,t2.category_simple_name from (select t1.bailun_sku,{selcol},platform_type from dc_base_oms_sku t1 where t1.has_scalp=0 and t1.has_delete=0 and t1.has_innersale=0 and t1.bailun_order_status!='Canceled' and t1.has_innersale=0 and t1.bailun_interception_status in ('','None','Failed') and t1.company_id=1 and ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA')
varsql=$@"select {showcol} as count,t0.platform_type,t2.category_simple_id,t2.category_simple_name from (select t1.bailun_sku,{selcol},platform_type from dc_base_oms_sku t1 where t1.has_scalp=0 and t1.has_delete=0 and t1.has_innersale=0 and t1.bailun_order_status!='Canceled' and t1.has_innersale=0 and t1.bailun_interception_status in ('','None','Failed') and t1.company_id=1 and ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA') and t1.id not in ( select id from dc_base_oms_sku where seller_account in ('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') and purchase_create_time >= '2021-12-23')
and t1.paid_time >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.paid_time < '{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}' {sqlwhere}) t0
left join dc_base_sku t2 on t0.bailun_sku = t2.bailun_sku