ifnull(t2.product_type_desc,'未知') as 'product_type_desc',
sum(t1.bailun_sku_quantity_ordered) as 'sales',
t1.receipt_country as 'country_code',
date_format(paid_time, '%Y-%m') as 'date_str',
paid_time as 'date',
1 as 'year_growth_rate',
now() as 'create_date',
now() as 'update_date'
from dc_base_oms_sku as t1
left join dc_base_sku as t2 on t1.bailun_sku =t2.bailun_sku
where t1.bailun_order_status != 'Canceled'
and t1.has_delete = 0
and t1.has_scalp = 0
and t1.has_buyer_remark = 0
and t1.has_platsku_remark = 0
and t1.paid_time>='2019-01-01' and t1.paid_time<'2020-01-01'
GROUP BY t2.product_type,t2.product_type_desc,t1.receipt_country,date_format(paid_time, '%Y-%m')
",new{btime},commandTimeout:0).ToList();
foreach(varitemindatas)
{
varoldData=_connection.QuerySingleOrDefault<dc_report_sales_trend_year>(" select * from dc_report_sales_trend_year where date_str=@date_str and product_type_desc=@product_type_desc and country_code=@country_code ",new{