Commit 64f044cf by jianshuqin

修改逻辑:平台利润从2021年12月23号后过虑 美美哒和达馨账号数据

parent 37a8abc3
......@@ -2274,6 +2274,10 @@ namespace Bailun.DC.Services
sql += " and t1.profit_rate<" + (rate_end.Value / 100);
}
//从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;
......@@ -2378,6 +2382,8 @@ namespace Bailun.DC.Services
sql += " and t1.profit_rate<" + (rate_end.Value / 100);
}
//从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')";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
{
......@@ -2828,7 +2834,7 @@ namespace Bailun.DC.Services
sqlparam.Add("platform_type", platform);
}
var sql = $@"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')
var sql = $@"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
group by t0.platform_type,t2.category_simple_id";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment